Member-only story

What you should know about Javascript Math Object

habtesoft
3 min readSep 24, 2024

--

The JavaScript Math object is a built-in object that provides a variety of mathematical functions and constants. It allows you to perform complex mathematical calculations without needing to write your own logic. Let's break down the essential aspects you should know about the Math object.

Not a Medium member? Read this article here

1. Basics of the Math Object

  • The Math object is not a constructor, meaning you cannot instantiate it using new Math().
  • All Math properties and methods are static; you call them directly using Math.methodName() or Math.propertyName.

2. Commonly Used Math Properties

Here are some of the useful properties that represent mathematical constants:

3. Math Methods

The Math object includes many methods for performing mathematical calculations. Below are some of the most important methods:

3.1 Rounding Methods

3.2 Absolute and Sign Methods

--

--

habtesoft
habtesoft

Written by habtesoft

Passionate JavaScript developer with a focus on backend technologies. Always eager to connect and learn. Let’s talk, https://buymeacoffee.com/habtesoftat

No responses yet