Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

range in javascript

function range(start, stop, step) {
    var a = [start], b = start;
    while (b < stop) {
        a.push(b += step || 1);
    }
    return a;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #range #javascript
ADD COMMENT
Topic
Name
4+2 =