Description
The random() method returns a random number between 0 and 1.
This method has the form:
Math.random()
Examples
The following example shows the basic use of this method.
<script>
document.write(Math.random());
</script>
This produces the following result:
Browser Support
Firefox | IE | Chrome | Opera | Safari |
---|---|---|---|---|