repl.txt (674B)
1 2 {{alias}}( fcn, n[, thisArg] ) 3 Invokes a function `n` times and returns an array of accumulated function 4 return values. 5 6 The invoked function is provided a single argument: the invocation index 7 (zero-based). 8 9 Parameters 10 ---------- 11 fcn: Function 12 Function to invoke. 13 14 n: integer 15 Number of times to invoke a function. 16 17 thisArg: any (optional) 18 Function execution context. 19 20 Returns 21 ------- 22 out: Array 23 Array of accumulated function return values. 24 25 Examples 26 -------- 27 > function fcn( i ) { return i; }; 28 > var arr = {{alias}}( fcn, 5 ) 29 [ 0, 1, 2, 3, 4 ] 30 31 See Also 32 -------- 33