Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

for..of 并不适用遍历 类数组对象 #30

Open
daihuaxing opened this issue May 9, 2022 · 1 comment
Open

for..of 并不适用遍历 类数组对象 #30

daihuaxing opened this issue May 9, 2022 · 1 comment

Comments

@daihuaxing
Copy link

壹2.9.2的总结这里
总结:
for..of适用遍历数组/类数组对象/字符串/map/set等拥有迭代器对象的集合,但是不能遍历对象,因为没有迭代器对象。遍历对象通常用for...in来遍历对象的键名。

@chengwb53
Copy link

for of MDN
支持NodeList(以及其他 DOM 集合)
arguments 对象

自定义类数组不支持

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants