3 ms·
> the "class" keyword was a huge mistake. There are no classes in Javascript, there are only objects That's true if you define the word "class" to not include
by Lazare 10y ago
> the "class" keyword was a huge mistake. There are no classes in Javascript, there are only objects
That's true if you define the word "class" to not include JS classes, but in that case, you can use the keyword and still "embrace" prototypal inheritance, since as you say, it's all just objects (even if you use the class keyword).
Alternatively if you use a more flexible definition of the word class, then your assertion is not true, because JS does have classes, they just are implemented via prototypes.
Either way, I don't see how your comment is correct. Is it all objects, or not? :)