I have seen so many posts which says that Class are just Syntactic Sugar or asking if Class are Syntactic Sugar in Javascript ES6
But I am having tough time understanding the meaning of Syntactic Sugar (I do get the literal meaning of making things easy to read or understand).
My Question is how classes are syntactic sugar in Javascript?
For example in this question are es6 classes just syntactic sugar for the prototypal pattern in javascript?
Like how is this example relevant
class Thing {
//... classy stuff
}
vs
var Thing = function() {
// ... setup stuff
};
Thing.prototype.doStuff = function() {};
Shouldn't there be some method (doStuff) in the above class to make it equal comparison?