Introduction to Variables

The Intro to Variables tutorial introduces the ideas of incorporating variables in the Intro to JS: Drawing & Animation programming method.
== Intro to Variables ==
In this tutorial https://www.khanacademy.org/computing/computer-programming/programming/variables/p/intro-to-variables, the user learns how variables can "hold on to" a value, such as a parameter or color, until used later again in the script. For example, var eyeSize (as shown in the screenshot) can be defined, and then have a value assigned to it, such as var eyeSize = 3. Winston's eyeSize is actually the example in this coding talk through.
The syntax to defining variables is:
var x = value;
A value can be assigned to any given previously stated variable by defining it on the right side of the equal sign. The user can, for example, assign a color or (pixel) value to a variable.
Example:
var eyeSize = 33;
or,
var eyeColor = color(0, 0, 0); (rgb value)
==External Sources==
Category:Tutorials
Category:Intro to JS
Category:Computing
Category:Variables
Category:Coding Talk Throughs