ES6 - Math-SQRT2 屬性



2 的平方根,約為 1.414。

語法

Math.SQRT2 

示例

console.log(Math.SQRT2)  // the square root of 2: ~1.414             

輸出

1.4142135623730951             
廣告
© . All rights reserved.