Challenge: Double Rainbow is a challenge in the Object-Oriented Design lesson. The goal is to use the object oriented technique to draw multiple rainbows.
Challenge[]
This program describes a rainbow as an object literal and then draws it on the canvas.
Steps[]
There are three steps in this challenge:
- Create a Rainbow object that stores the x, y, and radius in a constructor function.
- Make a new variable to call the drawRainbow function, and draw the rainbow.
- Draw another rainbow in the same way with a different variable.
☀ All Khan Academy content is available for free at: www.khanacademy.org