JavaScript tanh() method

Definition and usage

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

Example

Returns the hyperbolic tangent of a number:

Math.tanh(1);

Try it yourself

Syntax

Math.tanh(x)

Parameter value

Parameter Description
x Required. Number.

Technical details

Return value: Number.
JavaScript Version: ECMAScript 6

Browser Support

Method Chrome Edge Firefox Safari Opera
tanh() 38 12 25 8 25

Related Pages

Tutorial:JavaScript Math