JS Built-ins
← Math27 / 215
MathPIbeginner

Math.PI β€” circle circumference

πŸ“– Usage Example
// Pi β€” ratio of circumference to diameter
Math.PI       // β†’ 3.1415926535...
2 * Math.PI   // β†’ 6.2831... (full circle in radians)

Use Math.PI when calculating circle circumferences, areas, or converting between degrees and radians.

Math.PI

The circumference of a circle is 2Ο€r. For a unit circle (r=1), circumference = 2Ο€ β‰ˆ 6.283.

Challenge: Use Math.PI to compute circle circumferences.

πŸ’‘ Hints (2)
  • β€’ Circumference = 2Ο€r
  • β€’ 2 * Math.PI β‰ˆ 6.283185307179586