node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…


Generates an array of consecutive integers starting at 0


Fills an array with sequential integers. Just like C++'s std::iota() or the similarly named function in APL.

npm install iota-array
//    [0,1,2] 

Constructs an array of length n of n sequential integers starting from 0.

  • n the length of the array to construct

Returns: An array of n sequential integers starting at 0


(c) 2013 Mikola Lysenko. MIT License