DEV Community

Discussion on: Top 10 JavaScript Patterns Every Developer Likes

Collapse
 
sirgalleto profile image
Sebastián Osorio

Just to confirm that you are aware of the ES6 Class support caniuse.com/#feat=es6-class

I do like this post, but "JavaScript does not support the concept of classes" is not a fact since time ago.

Please keep learning and don't stop posting!

Collapse
 
izerozlu profile image
izerozlu

I've come to the discuss section to see this kind of comment. Good pointing!

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)?