Object Literal Enhancements
Champions: Allen Wirfs-Brock, ?
ES Wiki
Property Value Shorthand
Provide a shorthand for object initialisers whose property keys are initialized by variables of the same name.
The example:
function f( x, y ) {
return { x: x, y: y };
}
Would be written as:
function f( x, y ) {
return { x, y };
}
Method Definition Shorthand
The example:
var o = {
method: function() {
return "Hello!";
}
};
Would be written as:
var o = {
method() {
return "Hello!";
}
};