Math.tanh

tanh — Returns the hyperbolic tangent of a number.

Description

Math.tanh(number number)

Parameters

Name Description Type Default Optional
number number No

Examples

Example #1 – tanh example
console.log(Math.tanh(4)); // 0.9993292997390669 console.log(Math.tanh(0)); // 0 console.log(Math.tanh(-3)); // -0.9950547536867306 console.log(Math.tanh('2')); // 0.964027580075817

External references