Skip to content

MUSA611-CPLN692-spring2020/MUSA611-CPLN692-week3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Week 3

As always: make a copy of this repository to commit changes to

Week 2 Review

Skills Review

  • Data structures (arrays & objects)
  • Loops

Homework and labs

  • Review of our first assignment
  • Questions and demonstration

Lecture and Labs

Example leaflet application

  • In class walk-through of example application

Lab 1: Using functions (liberally!)

  • Function anatomy
    • Naming/defining functions vs calling functions
    • Providing arguments
    • The function body
    • The return statement
  • Thinking functionally
    • Programs are data and its transformations
    • Functions are just transformations on data
    • Functions are values
  • Lab 1

Live coding: refactoring code into functions

  • Imagine alternative code flows
  • Organize the code
  • Make code DRYer ('don't repeat yourself')
    • Redundant code is a headache to maintain

underscore.js

Lab 2: Library overview

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

*Mostly!

Assignment

  • Complete Week 3 Labs
  • Review difficult concepts (this is subjective)
  • Finish week 2 assignments if necessary

About

Functions, higher order functions, and libraries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published