Last active
September 12, 2018 15:24
-
-
Save rsurjano/3f4403ca0e407567e02aa25e229ce6e2 to your computer and use it in GitHub Desktop.
Array Utils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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