- 2
What is use of Math random() function??
5 ответов
+ 5
Hi here! For example you need to fill your array random numbers... Or come up with a random digital password, generate a digital captcha...
+ 2
You use Math.random() to generate a random decimal number between 0 and 1. There are many cases where it could be useful.
+ 2
E.g if you're simulating the output of rolling two dice or generating a random outcome in an adventure game.
+ 2
It is for choosing random numbers or value frome specified range