totn JavaScript

JavaScript: Math asinh() function

This JavaScript tutorial explains how to use the math function called asinh() with syntax and examples.

Description

In JavaScript, asinh() is a function that is used to return the hyperbolic arc sine (also called inverse hyperbolic sine) of a number. Because the asinh() function is a static function of the Math object, it must be invoked through the placeholder object called Math.

Syntax

In JavaScript, the syntax for the asinh() function is:

Math.asinh(number);

Parameters or Arguments

number
The number used to calculate the hyperbolic arc sine.

Returns

The asinh() function returns the hyperbolic arc sine of a number.

Note

  • Math is a placeholder object that contains mathematical functions and constants of which asinh() is one of these functions.

Example

Let's take a look at an example of how to use the asinh() function in JavaScript.

For example:

console.log(Math.asinh(1));
console.log(Math.asinh(1.5));
console.log(Math.asinh(-2));

In this example, we have invoked the asinh() function using the Math class.

We have written the output of the asinh() function to the web browser console log, for demonstration purposes, to show what the asinh() function returns.

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

0.881373587019543
1.1947632172871094
-1.4436354751788103

In this example, the first output to the console log returned 0.881373587019543 which is the hyperbolic arc sine of 1. The second output to the console log returned 1.1947632172871094 which is the arc sine of 1.5. The third output to the console log returned -1.4436354751788103 which is the arc sine of -2.