logintermediate// Natural logarithm (base e)
Math.log(1) // β 0
Math.log(Math.E) // β 1Use Math.log() to compute the natural logarithm of a positive number.
Returns the natural logarithm (base e) of a number.
Challenge: Observe that Math.log(-1) returns NaN since the natural log is undefined for negative numbers.