Assignments > Tutorial 7: JavaScript: Higher-Order Functions & DOM Manipulation
Due Wed, 03/18 at 11:59pm
Update: Walthrough Videos for Part C
If you get stuck or need help, I have made some walkthrough videos.
Please try to do as much as you can on your own before referring to the videos: following along can be helpful for learning, but it doesn’t engage your brain in the same way as trying to solve these problems on your own. Good luck!
Overview
This tutorial focuses on higher-order array functions (forEach, map, filter, toSorted), destructuring and object copying, and DOM manipulation. Complete 3 exercises that build on each other.
Setup
Create a new folder called tutorial07 inside your csci344/tutorials folder. You’ll create the files for each activity as you work through them.
Complete the Activities
- Array Methods Practice - Practice with
forEach,map,filter, andtoSortedusing Node.js - Destructuring & Object Copying - Practice array/object destructuring and copying objects
- Course Search Interface - Build a searchable course catalog with DOM manipulation
What to Submit
After completing all activities (7A, 7B, and 7C), please:
- Create links from your homepage to your Tutorial 7C page.
- Commit and push your changes to GitHub.
- Submit both:
- your GitHub repository link
- your GitHub Pages link
If you collaborated with someone, include your partner’s name in your submission comments.
Summary of JavaScript Concepts Used
| Concept | Tutorial | Purpose |
|---|---|---|
| forEach | 7A, 7C | Iterate over arrays and perform actions |
| map | 7A, 7C | Transform array elements into new values |
| filter | 7A, 7C | Select elements that match criteria |
| toSorted | 7A | Create sorted copies of arrays |
| Destructuring | 7B | Extract values from arrays and objects |
| Spread Operator | 7B | Copy and merge arrays/objects |
| Object Copying | 7B | Shallow and deep copying techniques |
| Template Literals | 7C | Create HTML strings with variables |
| DOM Manipulation | 7C | Update page content dynamically |