Skip to content

Session 3

Monica Kay edited this page Dec 3, 2021 · 2 revisions
  • introduce basic syntax and structure of switch statement
  • reassign variable value in different cases
  • set default case
  • discuss how switch statements differ from if...else statements
  • introduce basic syntax and structure of for...of loop
  • discuss how for loops differ from for...of loops
  • use for...of loops to iterate through an array and access each object within it
  • for each object in an array, use dot notation to access the values of specific properties
  • iterate through collections of objects using for...of loop
  • iterate over an array of objects, generating string representations of each one by interpolating its property values into a string
  • append each string to the existing value of a variable using the addition assignment operator: +=
  • use dot notation to add a new property to each object in an array, and the assignment operator to assign value to it.
  • review function parameters and arguments
  • review arrow function syntax
  • discuss the difference between invoking a function and defining it
  • capture the return value in a variable
  • discuss undefined and how it is related to the return keyword

Clone this wiki locally