JS Built-ins
← Math138 / 215
Mathlogintermediate

Math.log() β€” log(eΒ²) = 2

πŸ“– Usage Example
// Natural logarithm (base e)
Math.log(1)        // β†’ 0
Math.log(Math.E)   // β†’ 1

Use Math.log() to compute the natural logarithm of a positive number.

Math.log()

Returns the natural logarithm (base e) of a number.

Challenge: Verify that Math.log(Math.E * Math.E) returns approximately 2.

πŸ’‘ Hints (1)
  • β€’ ln(e^2) = 2 by logarithm power rule