This commit is contained in:
Ilya Kantor 2016-07-07 19:00:12 +03:00
parent 354c616abc
commit a9222196ae
10 changed files with 362 additions and 649 deletions

View file

@ -235,17 +235,9 @@ Property value shorthands
```
Methods definitions
: For properties that are functions, there's also a shorter syntax.
: For properties that are functions, we've already seen a shorter syntax.
```js
// these two objects are equal
let user = {
sayHi: function() {
alert("Hello");
}
};
let user = {
sayHi() { // same as "sayHi: function()"
alert("Hello");