I got this javascript code that returns a random integer number between 1
and 10
.
I got a problem making it return a random number between -7
and -12
.
You gotta bail me out of this one, please...
const a = Math.floor(Math.random() * (10 - 1)) + 1;
console.log(`Random value between 1 and 10 is ${a}`);
Aucun commentaire:
Enregistrer un commentaire