Created
June 14, 2017 21:18
-
-
Save tennisonchan/8f763ded87f1294bdbe1b6ee8d918061 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
let randomArray = (len=10, max=100) => [...new Array(len)].map(() => Math.floor(Math.random() * max)) | |
let randomArrayOld = function(len, max) { | |
return Array.apply(null, Array(len)).map(function() { | |
return Math.floor(Math.random() * max); | |
}); | |
} | |
let normalArray = (len=10) => [...new Array(len)].map((a,i) => i); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment