What will be the result of the code?
 alert(Math.floor(Math.random())); 
Explanation
Math.random () will output a random number in range 0-1 and Math.floor () will rounded down to the nearest whole, that is means to 0.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
JavaScript quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes