Euler's Number in JavaScript

Level 120 keystrokes

Prints Math.E, Euler's number and the base of natural logarithms: 2.718281828459045.

JavaScript code

// Math.E is a read-only property holding Euler's number e ≈ 2.718
// It is the base of natural logarithms, so Math.log(Math.E) is 1
1console.log(Math.E);

Output

2.718281828459045
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
  • ;× 1
  • (× 1
  • )× 1

More JavaScript examples at level 1

← JavaScript typing practice