mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2024-04-21 12:32:22 +00:00
docs(style): fix arrow function
This commit is contained in:
+1
-1
@@ -250,7 +250,7 @@ const nodes = Array.from(foo);
|
||||
})();
|
||||
```
|
||||
|
||||
那些需要使用内联函数(或匿名函数)的场合,尽量用箭头函数代替。因为这样更简洁,而且绑定了 this。
|
||||
那些使用匿名函数当作参数的场合,尽量用箭头函数代替。因为这样更简洁,而且绑定了 this。
|
||||
|
||||
```javascript
|
||||
// bad
|
||||
|
||||
Reference in New Issue
Block a user