Created
August 7, 2018 16:33
-
-
Save renatocassino/3a53a6c98bb33c283a4321b156a78b1c to your computer and use it in GitHub Desktop.
2048-getRandomIndex.js
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
const getRandomIndex = (zeros) => { | |
return zeros[parseInt(Math.random() * zeros.length)]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment