SHSubjectHub

Validation and Setters (JavaScript)

OOPA-levelLesson packSubscription

About this resource

Learn how to enforce rules on data using validation in constructors and setter methods in JavaScript, including the delegation pattern.

11 slides.

Lesson outline

  1. Validation — Where Does it Go?
  2. Validation in the Constructor
  3. Setter Methods in JavaScript
  4. The Delegation Pattern
  5. Thermostat in JavaScript: Full Demo
  6. UML: Thermostat
  7. Clamping or Rejection?
  8. Coding Practice: Thermostat + PasswordVault
  9. Lesson Summary
Unit bundleUnit 2B · Validation and Setters
Part of: Unit 2B · Validation and Setters: the whole unitEvery resource in the unit in one zip.

More from Unit 2B · Validation and Setters