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:
parent
87d321e9ef
commit
372eb0f67f
@ -260,12 +260,11 @@ const nodes = Array.from(foo);
|
|||||||
});
|
});
|
||||||
|
|
||||||
// good
|
// good
|
||||||
[1, 2, 3].map(x => {
|
[1, 2, 3].map(x => x * x);
|
||||||
return x * x;
|
|
||||||
});
|
|
||||||
|
|
||||||
// with more than one argument
|
// with more argument and code
|
||||||
[1, 2, 3].map((x,i) => {
|
[1, 2, 3].map((x,i) => {
|
||||||
|
console.log(x);
|
||||||
return x * i;
|
return x * i;
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user