Skip to content

Instantly share code, notes, and snippets.

@k9t9
Created December 14, 2016 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k9t9/fc0643c0d1bc712c856d17d06bce616f to your computer and use it in GitHub Desktop.
Save k9t9/fc0643c0d1bc712c856d17d06bce616f to your computer and use it in GitHub Desktop.
Create Numbers array JS
var foo = new Array(10);//create an empty array with length 45
var a = [];
for(var i=0;i<foo.length;i++){
// document.write('Item: ' + (i+1) + ' of ' + foo.length + '<br/>');
var file = 'string' + i +'.jpg';
foo.push(file);
}
function Array() {
var a = [];
for (var i = 0; i < /* arguments.length = */ N; i++) {
a.push(/* arguments[i] = */ undefined);
}
return a;
}
var foo = new Array(10);//create an empty array with length 45
// var a = [];
for(var i=0;i<foo.length;i++){
var file = 'string' + i +'.jpg';
foo.push(file);
}
var foo = range(1, 5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment