Skip to content

Instantly share code, notes, and snippets.

@shannonjen
Created August 20, 2017 21:22
Show Gist options
  • Save shannonjen/902a4d2ee77d48ffe293bb38ce0dbd88 to your computer and use it in GitHub Desktop.
Save shannonjen/902a4d2ee77d48ffe293bb38ce0dbd88 to your computer and use it in GitHub Desktop.

Unit 2

Objective

Write an interactive application using JavaScript

Intro to Programming

  • Distinguish between Primitive and Reference types

    • List types and describe which ones are primitive and which are reference types
    • Describe the difference between primitive and reference types
    • Describe the difference between == and ===
  • Write and evaluate JS expressions

    • Use operators &&, ||
    • String concatenation
    • Math operations
    • Precedence / parenthesis
    • Prefix / Postfix notation for integers
    • Variables (var, let, const)
    • Literals

Arrays

  • Create, store, and update data with arrays and objects
    • Create arrays using the array literal syntax
    • Access and store data with arrays and objects using bracket notation
    • Use basic native array methods such as push, pop, shift, and unshift to manipulate arrays
    • Describe when it's better to use either data structure

Loops

  • Control the flow of programs with conditionals and loops
    • Describe and build incrementing and decrementing for loops

Objects

  • Create, store, and update data with arrays and objects
    • Create objects using the object literal syntax
    • Access and store data with arrays and objects using bracket notation
    • Access and store data with objects using dot notation
    • Use Object.keys to pull keys from an object
    • Describe when it's better to use either data structure

Control Flow

  • Control the flow of programs with conditionals and loops
    • Implement if/else statements based on conditional statements
    • Implement switch case statements
    • Return conditional statements instead of explicitly returning true/false

Functions

  • Organize code with functions

    • App has multiple (10-15) functions
    • Functions have 0-2+ parameters
    • Functions call each other
    • Some functions return values
    • Some functions mutate state (console log, dom, file systems etc...)
  • Define and call functions that have variable parameters

    • Define and call functions that use the arguments keyword
    • Define and call functions that use the spread operator
    • Define and call functions that have default parameters

Accumulator Pattern

  • Solve problems with accumulator patterns
    • Implement filter, map
    • Implement join, toSentence (last objects have 'and')
    • Implement some, every, none
    • Implement sum, min, max, average
    • Implement leftpad, rightpad, indexOf
    • Group an array of objects by a property
    • Index an array of objects by a property

Hoisting, Scope, && Memory Diagrams

  • Describe and evaluate scope in JavaScript

    • Describe how hoisting works
    • Describe the various kinds of scope in JavaScript
    • Define and describe IIFEs and why they are used
  • Solve problems that require memory references

    • Construct nested objects from memory diagrams using both literals and dot notation
    • Draw memory diagrams from literals / snippets of code with dot notation

Clean Code

  • Refactor code according to DRY

    • Recognize the need for DRY refactorings
    • Extract methods
  • Refactor code according to SRP

    • Correctly identify the heuristic to apply to a given big function
    • Perform a refactoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment