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)?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.
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.
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)?