JS Built-ins
← Math167 / 215
Mathpowbeginner

Math.pow() β€” 3^3 = 27

πŸ“– Usage Example
// Raise base to an exponent
Math.pow(2, 8)    // β†’ 256
Math.pow(4, 0.5)  // β†’ 2

Use Math.pow(base, exp) to compute exponential values; in modern JS the ** operator is preferred.

Math.pow()

Returns the base raised to the exponent power.

Challenge: Use Math.pow(3, 3) to compute 3 cubed.

πŸ’‘ Hints (1)
  • β€’ 3^3 = 3 Γ— 3 Γ— 3 = 27