Though JavaScript is more than two decades old, for much of its history it was primarily used as a scripting language for webpages. Along with HTML, a markup language, and CSS, a style sheet language, it formed the holy trinity of frontend development. HTML provided the scaffolding for webpages, CSS styled those elements, and JavaScript made them dynamic. If a webpage is a building, HTML forms the bones, CSS the paint and drywall, and JavaScript the electricity and plumbing. (Eghbal 2020, p. 35)

JavaScript is a dynamically-typed scripting language. Though JavaScript’s syntax is based on Java (and thus resembles C), the similarities are largely superficial. All major web browsers support JavaScript to enable interactive web pages. This lesson introduces JavaScript and client-side input validation.

Learning Objectives

  • Describe the uses and limitations of JavaScript
  • Implement simple functions using JavaScript
  • Perform client-side validation of user input

How to Complete this Lesson

Complete the following learning activities: (2.75–3.5 hours total)

  1. Read JavaScript basics (15–30 minutes)
  2. Attend the class meeting (60 minutes)
  3. Optional: Watch “Wat(5 minutes)
  4. Work on the web development programming exercise (PEX) (90–120 minutes)
    • Create the required web pages (introduction, service partners, and volunteer information) with the specified static content

Resources