The JavaScript Math Objects provides various Functions and Constants / Properties, which allows us to perform mathematical functionality. Unlike other global objects, Properties and Functions inside the math object is static so, we can access the properties as ** Math.PI** and functions as

*.*

**Math.abs(number)**## JavaScript Math Object Properties

The following table will show you the list of Properties or Constants available in JavaScript Math Object

JavaScript Math Properties | Description |
---|---|

Math.E | It will return the Euler’s Number e, approximately equal to 2.71828 |

Math.LN2 | It will return Natural Logarithm of 2, approximately equal to 0.693 |

Math.LN10 | It will return Natural Logarithm of 10, approximately equal to 2.302 |

Math.LOG2E | It will return Logarithm of E base 2, approximately equal to 1.443 |

Math.LOG10E | It will return Logarithm of E base 10, approximately equal to 0.434 |

Math.PI | It will return the Pie Value, approximately equal to 3.14 |

Math.SQRT1_2 | It will return Square Root of 1/2 or 0.5, approximately equal to 0.707 |

Math.SQRT2 | It will return Square Root of 2, approximately equal to 1.414 |

## JavaScript Math Object Methods

The following table will show you the list of Functions available in JavaScript Math Object. In order to use the below functions, we have to use the Math object as prefix. For example, **Math.abs(x)**

JavaScript Math Functions | Description |
---|---|

abs(x) | It will return the Absolute value of a Given number |

acos(x) | It will return the Arc Cosine value of a Given number |

acosh(x) | It will return the Hyperbolic Arc Cosine (inverse Hyperbolic Cosine) value of a Given number |

asin(x) | It will return the Arc Sine value of a Given number |

asinh(x) | It will return the Hyperbolic Arc Sine (inverse Hyperbolic Sine) value of a Given number |

atan(x) | It will return the Arc Tangent value of a Given number |

atan2(y, x) | It will return the angle (in radius) from the X -Axis to the specified point (y, x). |

cbrt(x) | It is used to find the Cube Root of a Given number |

atanh(x) | It will return the Hyperbolic Arc Tangent (inverse Hyperbolic Tangent) value of a Given number |

ceil(x) | It is used to return the smallest integer value which is greater than or equal to the specified expression or a number. |

cos(x) | It will return the Cosine value of a Given number |

cosh(x) | It will return the Hyperbolic Cosine value of a Given number |

exp(x) | It is used to calculate the power of E, Where E is Euler’s number approximately equal to 2.71828. |

floor(x) | It is used to return the largest integer value which is less than or equal to the specified expression or a number. |

hypot(value1, value2,…..valueN) | It will extract the characters from a string based on the specified indices |

log(x) | It is used to calculate the logarithmic value of given number with base E. |

max(1, 2, 3, …..n) | It is used to return the Maximum or Largest value from the specified set of expression |

min(1, 2, 3, …..n) | It is used to return the Minimum or Smaller value from the specified set of expression |

pow(x, y) | It is used to calculate the Power of the specified expression |

random() | This function will return the random number between 0 and 1 |

round(x) | It is used to round the specified expression or an individual number to nearest integer. |

sign(x) | It will return the sign of a Given number. For instance, Positive, Negative or Zero |

sin(x) | It will return the Sine value of a Given number |

sinh(x) | It will return the Hyperbolic Sine value of a Given number |

sqrt(x) | It is used to find the square root of a specified expression or an individual number |

tan(x) | It will return the Tangent value of a Given number |

tanh(x) | It will return the Hyperbolic Tangent value of a Given number |

trunc(x) | It is used to remove the decimal values from specified expression and return the integer value |

Thank You For Visiting Our Blog

## Leave a Reply