FANDOM


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 Edit

This program describes a rainbow as an object literal and then draws it on the canvas. 

Steps Edit

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.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.