Last active
December 27, 2023 18:31
-
-
Save lucasprogamer/14b32e642970d8cfaa4f2e833cb020f0 to your computer and use it in GitHub Desktop.
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
function numerosMegaVirada() { | |
const min = 1; | |
const max = 60; | |
const max_numbers = 6; | |
let numbers = []; | |
do { | |
let number = Math.random() * (max - min) + min; | |
if (number >= min && number <= max && !numbers.includes(parseInt(number))) numbers.push(parseInt(number)); | |
} while (numbers.length != max_numbers); | |
return numbers; | |
} | |
numerosMegaVirada(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment