class 3

Section 12: Practice: Object-oriented Programming - Time to Practice!

The goals 💪🏻Practice Object-oriented Programming static The static keyword defines a static method or property for a class, or a class static initialization block (see the link for more information about this usage). Neither static methods nor static properties can be called on instances of the class. Instead, they're called on the class itself. Static methods are often utility functions, such a..

Section 11: Behind the Scenes: Classes & OOP - Prototypes & More

The goals 💪🏻What happens behind the scenes of classes and objects? ✌🏻Constructor functions (without classes) 👍🏻Prototype & Prototypical Inheritance class Person { name = 'Max'; constructor() { this.age = 30; } greet() { console.log( "Hi, I am " + this.name + "and I am " + this.age + "years old." ); } } const person = new Person(); person.greet(); function Person() { this.age = 30; this.name = 'M..

Section 10: Classes & Object-oriented Programming - Unleashing the Full Power of Objects

The goals 💪🏻What is "Object-oriented Programming" (OOP)? ✌🏻Classes & Instances 👍🏻Properties, Fields & Methods 👏🏻Inheritance Object-literal code Classes & Instances Class in JavaScript A JavaScript class is a blueprint for creating objects. A class encapsulates data and functions that manipulate data. Unlike other programming languages such as Java and C#, JavaScript classes are syntactic sugar o..