Chapter 2. Classes and Instances

In this chapter, we will start generating blueprints to create objects in each of the three programming languages: Python, JavaScript, and C#. We will:

  • Understand the differences between classes, prototypes, and instances in object-oriented programming
  • Learn an object's lifecycle and how object constructors and destructors work
  • Declare classes in Python and C# and use workarounds to have a similar feature in JavaScript
  • Customize the process that takes place when you create instances in Python, C#, and JavaScript
  • Customize the process that takes place when you destroy instances in Python, C#, and JavaScript
  • Create different types of objects in Python, C#, and JavaScript

Understanding classes and instances

In the previous ...

Get JavaScript : Object-Oriented Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.