Skip to main content
Version: 3.13.0

Math.tanh()

The Math.tanh() function returns the hyperbolic tangent of a number.

Syntax

Math.tanh(x)

Parameters

  • x
    • : A number.

Return value

The hyperbolic tangent of x.

Description

Because tanh() is a static method of Math, you always use it as Math.tanh(), rather than as a method of a Math object you created (Math is not a constructor).