Skip to content

Apr 23: JavaScript Modules

Learning Objectives

After today’s class, you should be able to:

  • Apply CSS effects (e.g., transitions, transforms) to enhance UI interactivity.
  • Explain how JavaScript modules organize code using import and export.
  • Implement modular JavaScript by creating and using separate module files.

Lesson Outline

Lecture [15 min]

Project [10 min]

  • Claims that will be revised soon:
    • B0 requirements for README
    • I24 data export AND import
    • I27 beyond browser defaults
  • Please add the following to your README.md:
    • Description (written for a developer audience)
    • Architecture diagram or explanation of source files
    • API’s used (claim B5: “API source is documented”)
    • Third-party libraries used (link to documentation)
    • Anything else that would be helpful in the future
  • localStorage requirement:
    • Please prefix all keys with teamXX_
    • Example team03_api-key
  • Check out https://w3stu.cs.jmu.edu/cs343s26/

Activity [50 min]

  • Work on the project or Lab 10
  • Project claims (3 min per team)

Before Tuesday

  1. Finish the reading from Prep 12.
  2. Submit Lab 10 on Gradescope. ← Due Mon at 11:59pm
  3. Make progress on Project 3 in your teamXX repository.