Hyperbolic Cosine in JavaScript

Level 126 keystrokes

Math.cosh() returns the hyperbolic cosine of 1 and prints 1.5430806348152437.

JavaScript code

// Math.cosh(x) returns the hyperbolic cosine, (e ** x + e ** -x) / 2
// For x = 1 that is about 1.5431; the result is never below 1
1console.log(Math.cosh(1));

Output

1.5430806348152437
Practice typing this code

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

More JavaScript examples at level 1

← JavaScript typing practice