Playground missing colors


#1

Hi,
I’ve a questions regarding the playground. Not sure if I’m doing something wrong or there actually is no colors available to choose from when practicing the drawbox function.
I’m new to this and hence clueless as to where to ask these questions.
I do apologize if this is not the correct way.

Thank You!


#2

You’re correct. The colors that you use in the early puzzles are actually just variables that store a string with the same name. For example, var red = 'red'; will create a red button and var blue = 'blue' will create a blue button that you can insert into a drawBox().

You can also just write the color directly into drawBox() using a string drawBox('yellow'). But an advantage to using the identifier is that you won’t have any spelling mistakes as long as you typed the color correctly when creating the variable.

–Frankie