This commit is contained in:
Ambrose 2024-08-20 11:04:01 +08:00 committed by GitHub
commit aaa540072f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -334,7 +334,7 @@ const myObj1 = {
}; };
// 获取 myObj1 的迭代器对象 // 获取 myObj1 的迭代器对象
const strArrIterator = myObj2[Symbol.iterator](); const strArrIterator = myObj1[Symbol.iterator]();
// 通过迭代器遍历 myObj1.strArr 的数据 // 通过迭代器遍历 myObj1.strArr 的数据
console.log(strArrIterator.next()); console.log(strArrIterator.next());
console.log(strArrIterator.next()); console.log(strArrIterator.next());