![Math Random Method](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0zi__v-BEo2Jbfq7eqCVKFOcEmV8bGgY-gguhomdva8uqz3yjTit-Kkprczug5rIIe6ehf2JMN4vrxWWcSV7nuWLSf9-F7ipgOAlye_QcTwlzT1-adTuFI-rdnzR5_9o6mon7iBDc6fB3/s1600/Random-Value.jpg)
Math.random() Method is used to return the random number between 0 inclusive but not 1 exclusive.
Syntax:
Math.random()
Example:
<script> var one = Math.random(); document.writeln('Output is : ' + one + '</br></br>'); var two = Math.random(); document.writeln('Output is : ' + two + '</br></br>'); var three = Math.random(); document.writeln('Output is : ' + three + '</br></br>'); var four = Math.random(); document.writeln('Output is : ' + four + '</br></br>'); </script>
Output:
Output is : 0.6772958513976521 Output is : 0.8799006679119346 Output is : 0.5298651974436075 Output is : 0.5920655796664953