I'm looking at this this page about various shorthand syntaxes in ES6 for declaring methods inside of objects.
I'm not understanding the differences between these two forms:
var foo = {
a() {},
b() {}
};
and
var foo = {
x: (y) => y
};
The article seems to make a clear distinction between these two formats, but doesn't the first one really just become the second? If we wanted to include parameters, we'd just do a(y) {}
in the first one.