for in, for of区别

for in
遍历对象返回的对象的key值;
遍历数组返回的数组的下标(key)。

for of
不可遍历对象

猜你喜欢

转载自blog.csdn.net/weixin_46852620/article/details/113616696