[Chapter 21] Reference: Math.sqrt()
Author: David Flanagan
Date: Fri Aug 29 11:18:00 1997

#

| Chapter 21 JavaScript Reference |

# Math.sqrt() Function

## Name

Math.sqrt() Function---compute a square root

## Availability

Navigator 2.0, Internet Explorer 3.0

## Synopsis

    Math.sqrt(x)

### Arguments

`x`

  Any numeric value or expression greater than or equal to zero.

### Returns

The square root of `x`.

## Description

`Math.sqrt()` returns the square root of its argument, which must be greater than or equal to zero.

## Usage

You can compute roots other than the square root of a number with `Math.pow()`. For example:

    function sq_rt(x)   { return Math.pow(x,1/2); }
    function cube_rt(x) { return Math.pow(x,1/3); }

## See Also

"Math", "Math.pow()"

Math.sin() |  | Math.SQRT1_2