Chapter 5: Events and Math

Introduction

This chapter explores how to handle user interactions with the event object, perform calculations using the Math object, work with regular expressions, and use switch statements for conditional branching.

Topics Covered

  • Event Object: Access event data on user interactions.
  • Math Object: Perform complex calculations.
  • Regular Expressions: Match patterns within strings.
  • Switch Statement: Evaluate multiple cases.