ES6 - Math-PI 屬性



圓的周長與其直徑之比,約等於 3.14159。

語法

Math.PI 

示例

console.log(Math.PI)  
// the ratio of a circle's circumference to its diameter: ~3.142           

輸出

3.141592653589793            
廣告
© . All rights reserved.