Answers for "a js function that returns random number"

5

get random numbers javascript

//Write the following code to get a random number between 0 and n
Math.floor(Math.random() * n);
Posted by: Guest on June-20-2020
0

function to generate random number in javascript

function random(number){
    return Math.floor(Math.random()*number);;
}
Posted by: Guest on August-24-2021

Code answers related to "a js function that returns random number"

Code answers related to "Javascript"

Browse Popular Code Answers by Language