Skip to content

laq-anqi/cpln692-week3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Section 2: Library overview
  • Selecting (filtering for) elements in lists
  • each: No more for loops!*
  • Lab 2

*Mostly!

Homework Assignment (Due: Wednesday, February 1)

  • Complete Week 3 Labs (Lab 2, Part 4 is an Optional Challenge)

About

The use of functions and higher order functions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 71.0%
  • CSS 16.6%
  • HTML 12.4%