Math.PI

PI — Returns the value of π (pi).

Description

Math.PI

Return values

number primitive.

Examples

Example #1 – PI example
console.log(Math.PI); // 3.141592653589793 console.log(Number(Math.PI).toFixed(20)); // 3.14159265358979311600

External references