Posts by LucasM GamerPlay • 1 point
2 posts
-
0
votes5
answers17254
viewsA: Generate multiple random numbers without repetition
function sorteado(max,quant) { var numeroS = [] while (numeroS.length < quant) { e = Math.ceil(Math.random() * max); if (numeroS.indexOf(e) == -1) { numeroS.push(e) } } return numeroS }…
-
-1
votes4
answers1660
viewsA: Function js to run at a given time
I did so setInterval(function () { var agora = new Date(); var a = `${agora}`; var resultado = a.split(" "); console.log(resultado[4]); if (resultado[4] == '00:00:00') { console.log('aqui fica sua…