Priya hosts a board game night every month, and her page lists the guests and this month’s games. But it changes only when she edits its script, so her guests still reply in a group chat. In this course, you’ll make the page respond: you’ll write JavaScript that runs when someone clicks, finds elements anywhere on the page, and changes them while the guests watch.
You’ll type along in your own editor and browser, check each change in the browser’s developer tools, and practice in RealJS exercises with automated tests that check your code. You’ll learn how to:
- Write arrow functions and pass functions to other functions as values
- Decide when a function should change an outer variable and when it should take a value in and return it
- Run your code on every click with
addEventListenerand keep track of state between clicks - Find every matching element on a page and step through the page tree from one element to the next
- Read and set attributes and
data-attributes, and switch classes and styles from your script - Inspect the live page in the Elements panel to confirm what your code changed
In the project, you’ll turn Priya’s game night page into an RSVP board. Each game card gets a button a guest clicks to say they’re bringing that game, and a vote button. Your script keeps the votes in an object, shows them on each card, highlights the leading game, and adds a Quick games only button that hides the games over 45 minutes and brings them back. Then you’ll explain your board to the mentor.
You need JavaScript basics, including loops, functions, and arrays of objects, and you should be able to serve a page with HTML, CSS, and a script, change text on it, and build elements from data. You’ll need a current version of Chrome or Edge, an editor, and a local server.
What’s Included:
- 21 Lessons
- Video Subtitles and Full Transcripts
- Translated Subtitles in 8 Languages
- 2 Downloadable Resources
- Interactive Quiz to Check Your Progress
- 6 Hands-On Coding Exercises
- Q&A With JavaScript Experts: Ask a Question
- Certificate of Completion
Downloadable Resources:
Related Learning Paths: