-
Notifications
You must be signed in to change notification settings - Fork 449
Closed
Description
Here's a rough outline that we came up with:
Intro
- Demo of a game to play
- This is not java, but the syntax sucks like it is
- What is the relationship between HTML and javascript?
- Clone a repo with HTML and CSS with some boxes with back of the cards
- Manipulate the HTML and CSS as a review of those topics
- Change cards colors
Primitive types
- Developer tools: Learn to use the console
- Introduce strings, numbers, booleans, variables, comments
- Use strings, numbers, booleans, variables and comments in our game in someway
- maxNumberOfCards = 16
- playerName = "my name"
- gameOver = false
- etc
- reload our page
Data Structures
- Introduction to Arrays
- Play with arrays in the console, learn to push, pop, iterate, and randomize?
- Create an array of 8 colors
- Assign each color to two cards
- Introduce Hash: key: value pair concept, actually called an object in javascript
- Terminology sidenote: Hash, Objects and OOP Objects
- Create an object of self's position: pair's position
- Looking things up by key to get the value
Control Flow
- In console, look at various return values and see what's truthy and falsey
- Basic function intro:
- Introduce conditionals by creating a function: onclick checks what the target is and look it up in our hash, and just return the match number
- Conditionals and Loops (and Switch statements?)
- == or ===
- Optional: Try/Catches - Add as bonus step or at the end
Functions and Scope
- Functions
- Closures
- Callbacks - goto for the modern era
- Functions create scope
- Optional: what is 'this'?
Optional Advanced Topics
- Object Orientation - Inheritance, Prototypal Inheritance is different, yo!
- new operator
- error handling