JavaScript Random

In JavaScript, you can generate a random number with the Math.random() function. It returns a random floating-point number ranging from 0 to less than 1.

Code :