[docs] Clear up “confusing arrows” example.

Closes #856.
This commit is contained in:
Jordan Harband
2016-06-21 22:41:03 -07:00
parent a597da56ca
commit 28a04a3a45

View File

@@ -912,7 +912,13 @@ Other Style Guides
const itemHeight = (item) => item.height > 256 ? item.largeSize : item.smallSize;
// good
const itemHeight = (item) => { return item.height > 256 ? item.largeSize : item.smallSize; };
const itemHeight = item => (item.height > 256 ? item.largeSize : item.smallSize);
// good
const itemHeight = (item) => {
const { height, largeSize, smallSize } = item;
return height > 256 ? largeSize : smallSize;
};
```
**[⬆ back to top](#table-of-contents)**