The JavaScript math tanh() method is used to get the hyperbolic tangent of a number.
Syntax:
Math.tanh(n)
Parameters
n: It represents the number whose hyperbolic tangent have to be get.
Returns
Hyperbolic tangent of a number.
Example
<!DOCTYPE html> <html> <body> <script> document.writeln(Math.tanh(1)); </script> </body> </html> |
Output
0.7615941559557649 |
Please Share