Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

js create array from for loop

var yearStart = 2000;
var yearEnd = 2040;

var arr = [];

for (var i = yearStart; i < yearEnd+1; i++) {
    arr.push(i);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #create #array #loop
ADD COMMENT
Topic
Name
8+1 =