JS Built-ins
← Math110 / 215
Mathexpbeginner

Math.exp() Always Returns a Number

πŸ“– Usage Example
// e raised to the power of x
Math.exp(0)   // β†’ 1
Math.exp(1)   // β†’ 2.7182... (Math.E)

Use Math.exp(x) to raise e to the power x β€” the inverse of the natural logarithm.

Math.exp(x)

Math.exp() always returns a value of type number for any input.

Challenge: Verify the return type of Math.exp() for various inputs.

πŸ’‘ Hints (2)
  • β€’ All Math methods return a number primitive
  • β€’ exp(100) is a very large but valid number