setup()
Initializes the canvas
Last updated
Initializes the canvas
Last updated
setup()
The setup() function is called only once at the beginning of the program. Its purpose is to set up the initial environment of the program, such as canvas size, background color, to load media such as images and fonts as the program starts and any other initial values that the program needs.
The setup()
function takes no arguments, and must be defined in the program before the draw()
function.
Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!
We'd love to hear your Feedback/Comments here.