JS Built-ins
← Math136 / 215
Mathlogbeginner

Math.log() β€” log(1) = 0

πŸ“– 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(1) returns 0.

πŸ’‘ Hints (1)
  • β€’ ln(1) = 0 because e^0 = 1