Lecture 5:
Arrays, Objects, and JSON in P1
CMPM 35: Data Structures for Interactive Media
January 15, 2019
Where are the rest of the resources for this class?
On Canvas: https://canvas.ucsc.edu/courses/28774
Reading practices check-in
Who checked their answers with others before submitting?
Who ran some JavaScript code to answer some questions?
If you approach programming in an experimental+social way,�there’s much less need for memorization.
Run scientific experiments to figure out the laws of your team’s virtual universe: https://p5js.org/reference/#/p5/fill
Previously
We looked at…
… in a Glitch project.
Let’s continue our experiments on another site: https://repl.it/languages/javascript
Arrays
Objects
Functions (yes, they data values too)
How do I find out the type of a value?
console.log(typeof value);
JSON
How do we assemble chunks of useful data?
Nesting {}, [], and primitives
Homework update
Readings: R04½ and R05 available on Canvas now
Programs: P1 available on Canvas now