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

docs(set): fix text

This commit is contained in:
ruanyf 2017-02-03 19:51:40 +08:00
parent 3c401eaa3c
commit efc5f2f8b6

View File

@ -9,9 +9,9 @@ ES6提供了新的数据结构Set。它类似于数组但是成员的值都
Set 本身是一个构造函数,用来生成 Set 数据结构。
```javascript
var s = new Set();
const s = new Set();
[2, 3, 5, 4, 5, 2, 2].map(x => s.add(x));
[2, 3, 5, 4, 5, 2, 2].forEach(x => s.add(x));
for (let i of s) {
console.log(i);