Using Math acosh() function to coding in Javascript/JS

This JavaScript tutorial explains how to use the math function known as acosh() with syntax and examples.


In JavaScript, acosh() is a characteristic that is used to return the hyperbolic arc cosine (also known as inverse hyperbolic cosine) of a number. Because the acosh() function is a static characteristic of the Math object, it ought to be invoked through the placeholder object referred to as Math.


In JavaScript, the syntax for the acosh() characteristic is:


Parameters or Arguments

number The variety used to calculate the hyperbolic arc cosine. The wide variety have to be a value greater than or equal to 1.


The acosh() function returns the hyperbolic arc cosine of a number.

If the variety is much less than 1, the acosh() feature will return NaN.


Math is a placeholder object that incorporates mathematical features and constants of which acosh() is one of these functions.


Let’s take a appear at an instance of how to use the acosh() feature in JavaScript.

For example:


In this example, we have invoked the acosh() function the use of the Math class.

We have written the output of the acosh() function to the net browser console log, for demonstration purposes, to exhibit what the acosh() function returns.

The following will be output to the internet browser console log:


In this example, the first output to the console log back 0 which is the hyperbolic arc cosine of 1. The second output to the console log returned 0.9624236501192069 which is the arc cosine of 1.5. The 1/3 output to the console log returned NaN on account that the wide variety was less than 1.