package
Generates an array of consecutive integers starting at 0
npm install iota-arrayGitHub-flavored package documentation.
Across all versions, last 30 days.
10,564,549 in 30 days
Runtime metadata.
Tagged topics.
Fills an array with sequential integers. Just like C++'s std::iota() or the similarly named function in APL.
npm install iota-arrayconsole.log(require("iota-array")(3))
//Prints:
//
// [0,1,2]
//
require("iota-array")(n)Constructs an array of length n of n sequential integers starting from 0.
n the length of the array to constructReturns: An array of n sequential integers starting at 0
(c) 2013 Mikola Lysenko. MIT License