FANDOM


Review variables

Review: Variables is a text page that capstones the first section on variables.

The page covers the steps involved in using a variable with examples:

  1. Declare it: var myVariable;
  2. Assign initial value: myVariable = 20;
  3. Declare and assign value in one line: var myVariable = 20;
  4. Re-assign value: myVariable = 21;

Spoiler alert: variables are often used with a loop where the value gets reassigned each time the loop runs again.

☀ All Khan Academy content is available for free at: www.khanacademy.org

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.