DEV Community

Discussion on: Top 10 JavaScript Patterns Every Developer Likes

Collapse
 
drewknab profile image
Drew Knab

They're not really classes.

To quote the caniuse you posted:

ES6 classes are syntactical sugar to provide a much simpler and clearer syntax to create objects and deal with inheritance.

Collapse
 
sirgalleto profile image
Sebastián Osorio

We know that, but the concept of Class exists, and can be used as classes are expected to be used.

Let's not confuse the syntax sugar with the inability to take advantage of them.

Collapse
 
hyurl profile image
Hyurl

We know JavaScript class is based on prototype, but can someone explain how
different it is than the legacy class in other languages such as Java, Python, C#, PHP, etc. Don’t those languages search properties and methods from a base class (/super class /parent class /prototype, whatever you call it)?