JS Built-ins
← Math85 / 215
Mathcbrtbeginner

Math.cbrt(125) Equals 5

πŸ“– Usage Example
// Cube root β€” works with negatives too
Math.cbrt(27)   // β†’ 3
Math.cbrt(-8)   // β†’ -2

Use Math.cbrt() to find the cube root of any real number, including negative values.

Math.cbrt(x)

Math.cbrt(125) returns 5 because 5Β³ = 125.

Challenge: Use Math.cbrt() to find the cube root of 125.

πŸ’‘ Hints (2)
  • β€’ 5Β³ = 125, so cbrt(125) = 5
  • β€’ Perfect cubes always produce integer results