Javascript - Math tanh() Method

The tanh() method returns a number that represents the hyperbolic tangent of a number.

Description

The tanh() method returns a number that represents the hyperbolic tangent of a number.

Syntax

Math.tanh(x)

Parameter Values

Parameter RequireDescription
x Required. A number

Return

A Number

Example

Return the hyperbolic tangent of a number:

Demo

//display the hyperbolic tangent of the number 1.
console.log(Math.tanh(1));

Result