8 Essential Math properties of Javascript

--

With the Javascript Math object, you can do mathematical work. The javascript Math object has many properties. Below are 8 essential Javascript Math properties.

  1. Math.abs(): The Math.abs() function returns the absolute value of a number. e.g

2. Math.ceil(): The Math.ceil() function always returns a number up to the next largest integer. e.g

3. Math.floor(): The Math.floor() function returns the largest integer less than or equal to a given number. e.g

4. Math.round(): The Math.round() function returns the value of a number rounded to the earliest integer. e.g

5. Math.min(): The Math.min() returns the lowest-valued number. e.g

6. Math.max(): The Math.max() function returns the highest-valued number. e,g

7. Math.random(): The Math.random() function returns a new number every time. If you a new number between 1 to 100 every time, you have to write the code below

8. Math.sqrt(): The Math.sqrt() function returns the square root of a number.e.g

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Akbor Hossain Rifat
Akbor Hossain Rifat

Written by Akbor Hossain Rifat

Hi There, MERN-Stack ,JavaScript ,TypeScript , React.js , Node.js , MongoDB , MySQL , WordPress Developer. Simplifying fullStack development for you.

No responses yet