1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-28 21:32:20 +00:00

Update style.md

This commit is contained in:
tommyZZM 2015-12-02 16:29:03 +08:00
parent 87d321e9ef
commit 372eb0f67f

View File

@ -260,12 +260,11 @@ const nodes = Array.from(foo);
});
// good
[1, 2, 3].map(x => {
return x * x;
});
[1, 2, 3].map(x => x * x);
// with more than one argument
// with more argument and code
[1, 2, 3].map((x,i) => {
console.log(x);
return x * i;
});
```