Javascript
JS Maths
Javascript Math Reference

JavaScript Math object is used to perform mathematical operations on numbers. Math is an inbuilt object that works with Number types but does not work with BigInt.

Example

Below example will give you a brief idea of JavaScript math objects:

// Return PI value (3.141592653589793) 
console.log(Math.PI);

Output:

3.141592653589793

This will print the value of Pi on the console.

JavaScript Math Properties and Methods

JavaScript Math object properties and methods in JavaScript are listed below:

JavaScript Math Properties

In JavaScript, a property is a key-value pair in an object. The Math object has only static properties, meaning they belong to Math itself and not to any instance. It does not have instance properties.

Static Property

A static property is a property that has the same value for the entire class.