Answers for "how to print 6 random numbers in javascript"

0

javascript generate 3 numbers 1 - 49

var arr = [];
while(arr.length < 8){
    var r = Math.floor(Math.random() * 100) + 1;
    if(arr.indexOf(r) === -1) arr.push(r);
}
console.log(arr);
Posted by: Guest on April-14-2020
1

random function javascript

let object = random(0, 50);
// making "object" a random number between 0 and 50.

console.log(object);
// printing object in the console
Posted by: Guest on June-24-2020

Code answers related to "how to print 6 random numbers in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language