diff --git a/docs/style.md b/docs/style.md index 6f51794..fcdd7e2 100644 --- a/docs/style.md +++ b/docs/style.md @@ -260,11 +260,15 @@ const nodes = Array.from(foo); }); // good +[1, 2, 3].map((x) => { + return x * x; +}); + +// best [1, 2, 3].map(x => x * x); -// with more argument and code +// best [1, 2, 3].map((x,i) => { - console.log(x); return x * i; }); ```