Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getInteiroAleatorioEntre(min, max) {
- var valor = Math.random() * (max - min) + min;
- return Math.floor(valor);
- }
- var opcao = 0;
- do {
- opcao = getInteiroAleatorioEntre(-1, 10);
- console.log('Opção valida escolhida foi', opcao);
- } while (opcao != -1)
- console.log('Até a próxima !');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement