Skip to content

Instantly share code, notes, and snippets.

@rsurjano
Last active September 12, 2018 15:24
Show Gist options
  • Save rsurjano/3f4403ca0e407567e02aa25e229ce6e2 to your computer and use it in GitHub Desktop.
Save rsurjano/3f4403ca0e407567e02aa25e229ce6e2 to your computer and use it in GitHub Desktop.
Array Utils
// 1. Basic for loop.
for(var i = 0; i < 5; i++) {
// ....
}
// 2. Using Array's join and split methods
Array.apply(null, Array(5)).forEach(function(){
// ...
});
// Lodash
_.times(5, function(){
// ...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment