Javatpoint Logo
Javatpoint Logo

JavaScript Math tanh() method

The JavaScript math tanh() method returns the hyperbolic tangent of the given number.

Syntax

The tanh() method is represented by the following syntax:

Parameter

num - A number.

Return

The hyperbolic tangent of a number.

JavaScript Math tanh() method example

Here, we will understand tanh() method through various examples.

Example 1

Let's see a simple example of tanh() method.

Test it Now

Output:

-0.7615941559557649
0
0.46211715726000974
0.9640275800758169

Example 2

Here, you can test tanh() method with your own test cases.

Test it Now
Next TopicJavaScript Math




Please Share

facebook twitter google plus pinterest

B.Tech / MCA


Learn Latest Tutorials