Node.js examples for Array:Array Value
Creates an array of integers from start up to stop.
/**/* www . java 2s . c om*/ * Creates an array of integers from start up to (but not including) stop. */ Util.Array.range = function range(start, stop) { if (arguments.length == 1) { stop = start; start = 0; } var ret = []; for (var i = start; i < stop; i++) { ret.push(i); } return ret; }