JavaScript Class_basics Guide
ES6 classes provide syntactic sugar over JavaScript's prototype-based inheritance with a cleaner, more intuitive syntax. The guide walks through Class Syntax. `class Person { constructor(name) { this.name = name } greet() { return "Hello" } }`. Constructor runs on instantiation. Methods are on prototype (shared). Static: `static method() { }` — called on class, not instance. Getters: `get fullName() { }`. Setters: `set fullName(val) { }`. Private: `#privateField` — truly private (ES2022). `new.target` — check if called with new. The guide is organized into 1 sections that build on each other, each pairing a prose explanation with runnable code. Related guides: Arrays, Strings, Numbers, Math, Date. This is one of 145 JavaScript guides on JS Reference — see the full list on the guides page. Practice what you learn in the JavaScript playground, and look up any unfamiliar term in the JavaScript glossary.