CMPS 2680 - Week 09 notes
Notes
Home
Monday
Wednesday
Friday
Monday
Refreshers: arrays and loops
Why loop?
for loops
while loops
Iterations and other loop styles
Concepts and keywords
Repetition
Iteration
Exit conditions
Nested loops
Break and continue
Infinite loops:
Try it (runforever false)
Try it (runforever true, beware!)
See
the cards demo
Arrays
Iterating over arrays
Adding
,
selecting
, and
removing
elements from arrays
forEach loops
Try forEach()
Objects
Defining objects
Properties and values
Arrays and objects
Demo:
Create an object
Demo:
Create an array of objects
Demo:
JS quiz template
Wednesday
Objects and
JSON
local storage
Creating and modifying objects
Try creating and modifying objects
Local storage demo
Add to local storage
Load from local storage
Friday
Array vs. object iterations
Try-catch blocks
Demo: lists made in JavaScript
Clear
use classic
for
use
for...in
use
for...of
use
forEach
Array test
Object test