💻
[JS] The Interactive Web
CS4All Resources
  • Curriculum Overview
  • 📬Leave Us Feedback
  • Unit 1: HTML & CSS: Good vs Bad Design
    • 🔮Unit 1 Overview
    • U1LA1.1: Building with HTML
    • U1LA1.2: Structuring Pages with Divs, Classes, IDs
    • 🗃️U1LA1 Mini Project: My Fan Page Part 1
    • U1LA2.1: Styling your page with CSS
    • 🗃️U1LA2 Lab: My Fan Page Part 2
    • U1LA3.1: Layout with CSS Grid
    • 🗃️U1LA3.1 Lab: Grid Interview
    • U1LA3.2: Layout with Flexbox
    • 🗃️U1LA3.2 Lab: Flexbox Interview
    • U1LA4.1: Focus on Design in HTML && CSS
    • U1LA4.2: Breakpoint Lesson
    • 🗃️U1LA4 Lab: ChefHub Goes Mobile
    • U1LA5.1: Creating Accessible Websites
    • 🗃️U1LA5 Lab: What Do You Hear? Make it Accessible
    • U1LA6.1: Working with CSS Frameworks - Bulma
    • 🗃️U1LA6 Lab: CheeseBook Computers with Bulma
    • 🎨Unit 1 Final Project: My Travel Page
  • Unit 2: Intro to DOM Manipulation Basics
    • 🔮Unit 2 Overview
    • U2LA1: JavaScript Essentials - Variables to Arrow Functions
    • 🗃️U2LA1 Mini Project: JavaScript Essentials
    • U2LA2.1: DOM Manipulation with JavaScript Click Interactions
    • U2LA2.2: Accessible Shopping Cart
    • 🗃️U2LA2 Mini Project: The National Horse Race
    • U2LA3: Inputs and Conditionals
    • 🗃️U2LA3 Mini Project: The Interactive Site
    • U2LA4: Add, Remove, and Toggle
    • 🗃️U2LA4 Mini Project: The Cross-Wired Lightbulbs Puzzle
    • 🎨Unit 2 Final Project: Input-Output Helper Site
  • Unit 3: Advanced DOM
    • 🔮Unit 3 Overview
    • U3LA1: JavaScript Arrays, Iteration, and Objects
    • 🗃️U3LA1 Mini Project: Arrays, Iteration, and Objects Lab
    • U3LA2.1: JavaScript Essentials - Variables to Arrow Functions
    • U3LA2.2: Typeahead Search
    • U3LA2.3: Fuzzy Matching - Autocorrect
    • 🗃️U3LA2 Mini Project: Fuzzy Matching Personality Quiz
    • U3LA3.1 JavaScript Mutability
    • U3LA3.2: Advanced DOM Manipulation
    • 🗃️U3LA3 Mini Project: Card Organizer
    • U3LA4: Local Storage
    • 🎨Unit Final/U3LA4 Project: Twenty in Ten Game
  • Unit 4: Intro to APIs
    • 🔮Unit 4 Overview
    • U4LA1: Intro to APIs
    • U4LA1.2: JavaScript Arrays, Iteration, and Objects
    • 🗃️U4LA1 Mini Project: Deck of Cards: Higher Lower
    • U4LA2: Connecting to Closed APIs using the Giphy API
    • 🗃️U4LA2 Mini Project: DIY Dictionary
    • U4LA3.1: APIs vs SDKs
    • U4LA3.2: Requests on the Web - GET & POST
    • 🎨Unit 4 Final Project: API GUIs
  • Unit 5: Simple Websockets and Final Project
    • 🔮Unit 5 Overview
    • U5LA1: Servers and Express
    • 🗃️U5LA1 Mini Project: Express Lab
    • U5LA2: Intro to WebSockets
    • 🗃️U5LA2 Mini Project: Simple Sockets Lab
    • U5LA3: Socket Servers
    • 🗃️U5LA3 Mini Project: Socket Server Lab
    • U5LA4 [TBD]
    • 🎨Course Final Project Guide
Powered by GitBook
On this page
  • Teacher Notes
  • Prompt
  • Exemplar (teacher's view only)
  • Culturally Responsive Best Practice
  • Extra Help?
  1. Unit 3: Advanced DOM

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?

PreviousU3LA1: JavaScript Arrays, Iteration, and ObjectsNextU3LA2.1: JavaScript Essentials - Variables to Arrow Functions

Last updated 1 year ago

Teacher Notes

This vanilla javascript lab located exclusively in the script.js (1-3) ( | ) 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 ( | ) 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 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 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:

  • For basic array syntax, refer to the lesson notes.js or check out .

  • Here's a link to some and a separate one for .

  • For basic object syntax, refer to the lesson notes.js or check out .

  • Here's a link to the specifically.

  • Enjoy watching videos instead? This Youtuber has great videos on , , and an

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?

🗃️
repl.it
github
repl.it
github
finished example
this w3schools resource
array methods
the .sort() method
this w3schools resource
array iteration methods
array basics
array iteration methods
array of objects!
Extra Help