Doing math

ES6 and above add a lot of new methods to the Math object, related to trigonometry, arithmetic, and miscellaneous. This lets developers use native methods instead of external math libraries. Native methods are optimized for performance and have better decimal precision.

Get Learn ECMAScript - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.