Lambda saysclass is syntax for creating objects with shared methods — a cleaner face on prototypes.
class User { … } defines a blueprint; new User() makes instances. Under the hood it's still prototypes, but the syntax is far clearer. Classes are not hoisted (use before define throws) and run in strict mode. They're the standard way to model entities with shared behavior.
Power-ups you unlock
class defines a blueprint; new makes instances
Sugar over the prototype system
Not hoisted; runs in strict mode
Methods are shared on the prototype
The Mutator attacks — common mistakes
Using a class instance before its declaration
Thinking classes are a totally new model (they’re prototypes)
Forgetting new (calling a class throws)
Boss battleDefine a class with a method and create two instances.