sqrt
The sqrt() method returns the square root of a number. The square root of a number x is the value y such that y² = x.
Interactive example
Syntax
typescript
function sqrt<
GenericInput extends number
>(
input: GenericInput
): numberParameters
input: The number for which to compute the square root.
Return value
The square root of the given number. If the number is negative, returns NaN.
