by phpnode · 11y ago · 0 comments
No, `class` is syntactic sugar for the most common way of doing classes in ES3 and ES5. There is no semantic difference between:
function Thing () {}
Thing.prototype.greet = function () { alert("hello"); };
and class Thing {
greet () {
alert("hello");
}
}
They are the same, so it introduces no new traps for library authors.