Extend the method shorthand syntax beyond initial object declaration.
```js
const obj = {};
obj.foo() {...}
```
Equivalent 2015 syntax:
```js
const obj = {
foo() {...}
};
```
This is nice for assignment to context:
```js
function Foo() {
this.bar() {...}
this.baz() {...}
}
const foo = new Foo();
foo.bar();
foo.baz();
```
Equivalent 2015 syntax:
```js
function Foo() {
this.bar = function() {...};
this.baz = function() {...};
}
```
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss