repl.txt (934B)
1 2 {{alias}}( [options] ) 3 Returns an iterator which generates a sequence of squared triangular 4 numbers. 5 6 If an environment supports Symbol.iterator, the returned iterator is 7 iterable. 8 9 Parameters 10 ---------- 11 options: Object (optional) 12 Function options. 13 14 options.iter: integer (optional) 15 Number of iterations. Default: 11585. 16 17 Returns 18 ------- 19 iterator: Object 20 Iterator. 21 22 iterator.next(): Function 23 Returns an iterator protocol-compliant object containing the next 24 iterated value (if one exists) and a boolean flag indicating whether the 25 iterator is finished. 26 27 iterator.return( [value] ): Function 28 Finishes an iterator and returns a provided value. 29 30 Examples 31 -------- 32 > var it = {{alias}}(); 33 > var v = it.next().value 34 0 35 > v = it.next().value 36 1 37 > v = it.next().value 38 9 39 40 See Also 41 -------- 42