STEP 2: Let's use the variable star_color to control the color of the rest of our stars!

The variable star_color is a string variable because it stores a string. A string is anything that is in quotes, for example, "white"!

Be sure you use the variable name star_color for each color argument, not the variable value.

  • For each star, change the color argument from "yellow" to the variable star_color.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)