Skip to content

Commit

Permalink
issue airbnb#1673
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatehsandhu authored Dec 26, 2017
1 parent f9fcb37 commit 10602b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,8 @@ Other Style Guides
<a name="constructors--chaining"></a><a name="9.3"></a>
- [9.3](#constructors--chaining) Methods can return `this` to help with method chaining.
> When? Use chaining when functions manipulate the internals of an object instead of just returning data.
```javascript
// bad
Expand Down Expand Up @@ -1141,8 +1143,9 @@ Other Style Guides

const luke = new Jedi();

luke.jump()
.setHeight(20);
luke.jump()
.setHeight(20); // same as var tmp = luke.jump(); tmp.setHeight(20);
// executes left to right. First jump() and then setHeight()
```
<a name="constructors--tostring"></a><a name="9.4"></a>
Expand Down

0 comments on commit 10602b4

Please sign in to comment.