sqrt

The Math.sqrt() method returns the square root of a number.

Syntax

Math.sqrt(x)

Returns

The square root of the number. NaN if the number negative.

Parameters

x (float)
A number.