MCPcopy Create free account
hub / github.com/devin87/Q.js / arr

Function arr

node/Q.js:264–289  ·  view source on GitHub ↗

* 按条件产生数组 arr(5,2,2) => [2,4,6,8,10] * eg:按1-10项产生斐波那契数列 =>arr(10, function (value, i, list) { return i > 1 ? list[i - 1] + list[i - 2] : 1; }) * @param {number} length 要产生的数组长度 * @param {number} value 数组项的初始值 * @param {number} step 递增值或处理函数(当前值,索引,当前产生的数组)

(length, value, step)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

isFuncFunction · 0.70

Tested by

no test coverage detected