Last active
January 28, 2019 16:55
-
-
Save rafegoldberg/594f93be479c192e4a26b8fc3ce3a837 to your computer and use it in GitHub Desktop.
New Array Filled Randomly (Javascript)
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
let | |
set = [...Array(40)].map(e=> ~~(Math.random()*40)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
apparently the
~~
operator is short forMath.floor
, who knew? More here.