1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

Update style.md

This commit is contained in:
bigbird231 2019-07-01 09:29:15 +08:00 committed by GitHub
parent c63caa345d
commit 61d8735cc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,7 +250,7 @@ const nodes = Array.from(foo);
})();
```
那些需要使用函数表达式的场合,尽量用箭头函数代替。因为这样更简洁,而且绑定了 this。
那些需要使用内联函数(或匿名函数)的场合,尽量用箭头函数代替。因为这样更简洁,而且绑定了 this。
```javascript
// bad