JS Built-ins
← Math196 / 215
Mathsqrtbeginner

Math.sqrt() β€” sqrt(9) = 3

πŸ“– Usage Example
// Square root of a non-negative number
Math.sqrt(16)   // β†’ 4
Math.sqrt(2)    // β†’ 1.4142...

Use Math.sqrt() to compute the square root of a non-negative number.

Math.sqrt()

Returns the square root of a number.

Challenge: Verify that Math.sqrt(9) returns 3.

πŸ’‘ Hints (1)
  • β€’ sqrt(9) = 3 because 3^2 = 9