Skip to content

Instantly share code, notes, and snippets.

@catherine-jones
Created August 30, 2015 10:23
Show Gist options
  • Save catherine-jones/a6cfc4bbeffc05b29699 to your computer and use it in GitHub Desktop.
Save catherine-jones/a6cfc4bbeffc05b29699 to your computer and use it in GitHub Desktop.
codeschool

2.1 Variable Discovery

variables store and manage data

to declare a variable

var variableName = 3

naming variables no spaces, no digits at the front, camelCase is good

reuse assignment operator to assign a new value but you dont need to use var again because the variable is already created or inside memory

all operations can be used with assignments such as *=

2.4 Variable Exploration

variables can store numbers and strings

you can use methods like .length on variables that store strings

strings are indexed from 0

.charAt() method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment