JavaScript math tanh() method

The JavaScript math tanh() method is used to get the hyperbolic tangent of a number.
Syntax:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Math.tanh(n)
Math.tanh(n)
Math.tanh(n)

Parameters
n: It represents the number whose hyperbolic tangent has to be get.

Returns
The hyperbolic tangent of a number.

Example:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<!DOCTYPE html>
<html>
<body>
<script>
document.writeln(Math.tanh(1));
</script>
</body>
</html>
<!DOCTYPE html> <html> <body> <script> document.writeln(Math.tanh(1)); </script> </body> </html>
<!DOCTYPE html>
<html>
<body>
<script>
document.writeln(Math.tanh(1));
</script>
</body>
</html>