Methods and toString (JavaScript)
OOPA-levelLesson packSubscription
About this resource
Learn how to add methods to a JavaScript class so objects can do things, and use toString to control how objects display.
10 slides.
Lesson outline
- Methods — What Objects Can Do
- Adding Methods: Live Demo
- UML — Adding the Methods Section
- The Problem with `console.log(rex)`
- Adding `toString()`: Live Demo
- All Three Languages: The Same Idea
- Coding Practice: The Counter Class
- Lesson Summary
Unit bundleUnit 1B · Methods and __str__


