MathObject-4

 

javaScript Math.random() function will return the random number. See the code snippet:

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <p id="sample"></p> <script> var result = Math.random(); document.getElementById("sample").innerHTML = result; </script> </body> </html>
Output