diff --git a/docs/style.md b/docs/style.md index 49cc1dd..33ac06c 100644 --- a/docs/style.md +++ b/docs/style.md @@ -263,6 +263,9 @@ const nodes = Array.from(foo); [1, 2, 3].map((x) => { return x * x; }); + +// best +[1, 2, 3].map(x => x * x); ``` 箭头函数取代`Function.prototype.bind`,不应再用self/\_this/that绑定 this。