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.
Doing math
Trigonometry-related operations
Often there is a need to use mathematical functions related to trigonometry, exponential, logarithmic, and so on. JavaScript provides native methods for that to make our work easy.
The following example code, which shows all trigonometry-related methods that are added to the Math object:
console.log(Math.sinh(0)); //hyberbolic sine of a value
console.log(Math.cosh(0)); //hyberbolic cosine of a value
console...