Math Extensions

in-built mathematical functions in ES6

The Number and the Math objects have been extended with many useful methods. There are many new mathematical functions in ES6.

In my opinion, the most useful and semantic addition is Math.trunc, which gives you the truncated integer value of a number.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.