CodeJavaScript + p5.js · ⌃ Space for hints
Draft saved locallyJavaScript · Spaces: 2
Live preview move your pointer inside
Mission 01 5 min
Reward+60 XP

Make the Sun Bigger

JavaScript number values are written without quotes, such as 40, 90 or 3.5. Functions can receive numbers as arguments. In this sketch, circle(300, 200, 40) uses the first two numbers for the centre and the third number for the diameter. Change only the diameter value so you can see how one numeric argument changes the result.

Learn more

01
Your mission

Change the sun’s diameter from 40 pixels to exactly 90 pixels without changing its centre.

  • Change the sun’s diameter from 40 pixels to exactly 90 pixels without changing its centre.
Mission complete Run sketch
Mission demoMake the Sun Bigger

Finished result only — the answer code stays hidden.