pi
Description
Get the value of pi, which is the ratio of the circumference of a circle to its diameter. The output will return approximately 3.14159.
Input / Parameter
N/A
Output
Example
In this example, we will call the pi
function and print the value in the console.
Steps
Drag a
button
component into the canvas and open theAction
tab. Select thepress
event of the button and drag theLog.write
function to the event flow.Call the function
Math.pi
inside theLog.write
function.
Result
The console will print the value of pi.
Last updated