Week 3
As always: make a copy of this repository to commit changes to
Class Outline
Week 2 Review & Introduction
- Posting in Gitter
- Functions
- Data structures
Functions continued
Section 1: Using functions (liberally!)
- Function anatomy
- Naming functions
- Providing arguments
- The function body
- The
return
statement
- Thinking functionally
- Programs are data and its transformations
- Functions are just transformations on data
- Functions as values
- Lab 1
Live coding: refactoring code into functions
- Step through the code and discuss
- Imagine alternative code flows
- Organize the code
- Make code DRYer ('don't repeat yourself')
- Redundant code is a headache to maintain
underscore.js
Library overview
Section 2:- Selecting (filtering for) elements in lists
each
: No morefor
loops!*- Lab 2
*Mostly!