CodesJava

Easy learning with example program codes

JavaScript math tanh() method

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 follow and like us:
error








Copyright © 2019 CodesJava DMCA.com Protection Status