Last active
July 19, 2025 23:34
-
-
Save theohogberg/7db204aba884bbcfcb269f272903bb0e to your computer and use it in GitHub Desktop.
Generate a random number in JavaScript (One-Liner) between 0 - 255; forces the resulting float into an integer due to how js converts values on bitwise ops
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
// random number between 0 - 255 | |
Math.random()*256|0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment