1.

Parse a string representation of date and time

Answer»

The Math.random() method displays a floating-point pseudo-random number between 0 and 1.

Note: The value is inclusive of 0 and exclusive of 1

The following is an example:

<!DOCTYPE HTML&GT; <html> <BODY> <script> var num = Math.random( ); document.write("Random number = " + num ); </script> </body> </html>

The output displays any random number between 0 and 1: 

Random number = 0.8085646074894297

When we will run the above program again, a new random value between 0 and 1 will get generated as shown below: 

Random number = 0.1117848013962992


Discussion

No Comment Found