Priya’s game night page responds to clicks now, but it keeps its guest list in two places. An array says who’s coming, the page says who’s arrived, and the arrival count drifts as soon as a late guest joins or someone leaves early. In this course, you’ll make the data the one source of truth: every click changes the data, and your code draws the page again from it.
You’ll type along in your own editor and browser, check each step in the browser’s developer tools, and practice in RealJS exercises with automated tests that check your code. You’ll learn how to:
- Add, remove, copy, and reorder array items with methods such as
splice()andslice(), and tell which ones change the array - Predict what happens when two names point to the same array, and make a copy when you need one
- Follow a click as it bubbles up the page, and handle every row of a list with one listener, even rows added later
- Keep the truth in your data and redraw the page from it with a
render()function - Give each record a stable ID from
crypto.randomUUID()instead of relying on its position - Split an app into modules with named exports and imports, and keep each module’s helpers private
In the project, you’ll build a scorekeeper for the evening’s game. Each player’s row gets buttons to add or take away a point or remove the player, and New round and Undo last round buttons change the rounds. Your render() works out every total and the leader from the scores each time it draws. Then you’ll split the app into three modules and explain it to the mentor.
You need JavaScript basics, including arrays, objects, and functions. You should also be able to make a page react to clicks, find elements, and switch their classes and data attributes. You’ll need a current version of Chrome or Edge, an editor, and a local server.
What’s Included:
- 23 Lessons
- Video Subtitles and Full Transcripts
- Translated Subtitles in 8 Languages
- 2 Downloadable Resources
- Interactive Quiz to Check Your Progress
- 7 Hands-On Coding Exercises
- Q&A With JavaScript Experts: Ask a Question
- Certificate of Completion
Downloadable Resources:
Related Learning Paths: