SQRT2

The square root of 2, approximately 1.414. SQRT2 is static, read-only.

Property of

Math

Example

The following function returns the square root of 2:

function getRoot2() {
      return Math.SQRT2
}

Description

Because SQRT2 is a static property of Math, you always use it as Math.SQRT2, rather than as a property of a Math object you created.