Skip to content

Instantly share code, notes, and snippets.

@ahmedhosnypro
Created June 22, 2022 13:31
Show Gist options
  • Save ahmedhosnypro/25caa6c5fa662afa3062cfabe8cd74cc to your computer and use it in GitHub Desktop.
Save ahmedhosnypro/25caa6c5fa662afa3062cfabe8cd74cc to your computer and use it in GitHub Desktop.
let rondomFloat = Math.random(); // 0 >= rondomFloat < 1
const value = 10
let rondomFloat2 = Math.random() * value // 0 >= rondomFloat2 < value
let rondomInteger = Math.floor(Math.random() * value); //
function getRandomInteger(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment