Math
Introduction
Math is an Object that contains many mathematical properties and methods, you can use these to perform mathematical operations.
You Don't Need to Create Math Object First, because as it has no constructor so you can directly use it.
Syntax for Accessing Mathematical Properties
Properties
Example
Syntax for Accessing Mathematical Methods
Methods
Example
Here,
It will return $2^4$ i.e. 16.
Math.random()
We have very important Math Function Math.random() that is used to return any random number between 0(included) to 1(excluded)
For Example : If you want to generate a random number Math.random() can be used.
Syntax
Example
Here,
These Random Outputs were generated in my program, you will be having different random number.