Hyperbolic Tangent in JavaScript
Level 126 keystrokes
Math.tanh() returns the hyperbolic tangent of 1 and prints 0.7615941559557649.
JavaScript code
// Math.tanh(x) returns the hyperbolic tangent, sinh(x) / cosh(x)// The result always lies between -1 and 1; for x = 1 it is about 0.76161console.log(Math.tanh(1));Output
0.7615941559557649
Practice typing this code. Results are not recorded in the rankings.
Symbols in this code
The symbols you type in this JavaScript code and how often they appear.
.× 2(× 2)× 2;× 1