Okay, time to make this animation more interesting!
In the code editor,
drawName() now has two items between the parentheses,
red. The text in the browser panel has also turned red!
drawName() is a set of repeatable code that we’ve defined elsewhere called a function. We can call the function, or ask the program to run that code, and pass in different values to see different responses. You already did this when you changed the value of the variables that you used to call
drawName(). When you call
drawName with two different values, you can set the message and the display color.
In addition to
red, we’ve defined variables that represent some other colors for you to use.
Change the second value in
red to one of the other variable color names defined in the code editor.