🗃️U3LA1 Mini Project: Arrays, Iteration, and Objects Lab

How can I store and manipulate data to later be used in various ways throughout my website?

Teacher Notes

This vanilla javascript lab located exclusively in the script.js (1-3) (repl.it | github) is a series of challenges for students to get familiar with javascript basic data structures, arrays and objects, and iterating through them. The extensions are included at the bottom of the script.js.

This lab is designed to come right after the Javascript Arrays, Iteration, and Objects lesson. Students should be able to jump right in and work on the challenges throughout the script files. As there are 3 files, plan to remind students how to comment and uncomment the corresponding script tags in the index.html as to which they are currently working on. (i.e. when they finish the script1.js they should comment out the line in the index.html and uncomment the script2.js line so they can see the results displayed in the Dev Tools.)

You can structure this lab to be 3 separate days, 1 day per each lab, all the labs on 1 day, or break it up how you see fit. The first lab is all about arrays, the second contains objects and nested objects, and the third is all about array iteration.

Students should utilize the Starter Code (repl.it | github) to begin this project.

Prompt

For this lab, put together what you've learned recently about javascript arrays and objects, and try the challenges in the script1.js. When you finish script1.js, there is two others you can work from (script2.js and script3.js). Use the resources below under Extra Help if you get stuck. When time's up come back here for some reflection questions.

Exemplar (teacher's view only)

Take a look at this finished example for the answer key to the javascript challenges.

Culturally Responsive Best Practice

Coming Soon

Extra Help?

Use the following resources to see examples of how to implement the methods, functions and other concepts in the script.js:

Reflection Questions:

  • Which script.js was the most challenging? What is something you're most proud of getting through?

  • What was one point in the challenges you got stuck? What did you do to unstick?

  • What's the difference between an object and an array? Why might you rather use an object? Why might you rather use an array?

Last updated