[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt [Back]  [Original]

Math.sqrt() - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

Math.sqrt()

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.

Math.sqrt() .

x0,Math.sqrt(x)=x=the uniquey0such thaty2=x\forall x \geq 0, \mathtt{Math.sqrt(x)} = \sqrt{x} = \text{the unique} ; y \geq 0 ; \text{such that} ; y^2 = x

In this article

js
Math.sqrt(x);

x

.

( ) . NaN .

x Math.sqrt() NaN .

sqrt() Math Math Math.sqrt() . (Math .)

Math.sqrt()

js
Math.sqrt(9); // 3
Math.sqrt(2); // 1.414213562373095

Math.sqrt(1); // 1
Math.sqrt(0); // 0
Math.sqrt(-1); // NaN

Specification
ECMAScript 2027 LanguageSpecification
# sec-math.sqrt


Web Proxy Viewer  |  New URL  |  Original Page