Khan Academy or Scratch Wikia
Advertisement
Double rainbow

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:

  1. Create a Rainbow object that stores the x, y, and radius in a constructor function.
  2. Make a new variable to call the drawRainbow function, and draw the rainbow.
  3. Draw another rainbow in the same way with a different variable.
☀ All Khan Academy content is available for free at: www.khanacademy.org


This article is a stub. You can help Khan Academy or Scratch Wikia by expanding it.


Advertisement