Skip to content

Instantly share code, notes, and snippets.

@kellishouts
Last active August 29, 2015 14:13
Show Gist options
  • Save kellishouts/badae5fc90239cef21e6 to your computer and use it in GitHub Desktop.
Save kellishouts/badae5fc90239cef21e6 to your computer and use it in GitHub Desktop.
Code is Not Math

Code is not Math

Equality is Weird

  • = does not mean “equals” it means “set a value”
  • == means “equal”
  • === also means “equal”

Programmers start counting at 0

  • var potatoes = [0, 1, 2, 3, 4, 5]

Coordinates a Grid are Different

  • Y-Axis Up is Negative, Down is Positive
  • X-Axis Left is Negative, Right is Positive.

Variables work differently

  • x = x+1 is valid.
  • It means take value x, then SET x to what it was plus 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment