JavaScript Math ObjectMath Objec

The built-in Math object includes mathematical constants and functions. You do not need to create the Math object before using it.

To store a random number between 0 and 1 in a variable called “r_number”:


To store the rounded number of 8.6 in a variable called “r_number”:


The Math object’s properties and methods are described below:

NN: Netscape, IE: Internet ExplorerProperties

Syntax: object.property_name

Leave a Reply

Your email address will not be published. Required fields are marked *