Skip to content

Instantly share code, notes, and snippets.

@martinlaws
Created November 23, 2015 18:24
Show Gist options
  • Save martinlaws/01d7062bd6bc606bf75b to your computer and use it in GitHub Desktop.
Save martinlaws/01d7062bd6bc606bf75b to your computer and use it in GitHub Desktop.
var myArray = []
var i = 0
var arrayOfLight = function(x) {
while(i < x + 1) {
myArray.push(i)
i++;
}
}
arrayOfLight(5);
console.log(myArray);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment