— Another thing you could do with the function syntax that you CAN'T do with class syntax is to 'redirect' the caller to use new if they omitted it:
function MyClass() {
if (!(this instanceof MyClass)) {
return new MyClass();
}
// ...
}
class syntax doesn't give you this at all
Message permanent page