Create an array within a range - Node.js Array

Node.js examples for Array:Array Operation

Description

Create an array within a range

Demo Code


var helper = {//w w w . j ava  2s .  c  o  m
    range: function(min, max) {
        var res = [];
        for(var i = min; i < max; i++) {
            res.push(i);
        }
        return res;
    },

Related Tutorials