What are strings and why should I care?
A string is what is used in computer programs to store text.
A string is simply a sequence of characters.
An example of a string enclosed by single quotes:
|'this is a string'|
An example of a string enclosed by double quotes:
|"this is another string"|
Let's try it out
Type the following into the the box where it says Enter source code here:
Click Check source code.
So what is happening here?
The function paint() is taking one argument - a string containing the name of a color.
When called, paint() will paint the box in the color given by the argument.