DEV Community

Understanding JavaScript Classes: A Beginner's Guide

Harish Kumar on March 20, 2024

JavaScript is a versatile and powerful programming language that is widely used for both front-end and back-end web development. One of the fundame...
Collapse
 
eshimischi profile image
eshimischi

Classes in ES6 is just a syntax sugar, at the end it transforms back to prototypes

Collapse
 
eriveltondasilva profile image
Erivelton da Silva

prototype is OOP

Collapse
 
eshimischi profile image
eshimischi • Edited

And yes and no! stackoverflow.com/a/152464 but i wasnt argue about whether JS is object-oriented or not, just said: Class in JS is only a syntax sugar

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

...which brings object-oriented programming (OOP) capabilities to JavaScript

Not really, JavaScript has always had OOP capabilities. The whole language is based on them.