参考: https://www.cnblogs.com/m2maomao/p/7743143.html
for of : es6引入的,可以遍历array、map、set、string、arguments(伪数组),不可以遍历普通对象,可以使用break
、continue
、return
和 throw退出迭代
for in: 遍历普通对象的可枚举属性
lurending0417 2019-03-12 10:20 原文
参考: https://www.cnblogs.com/m2maomao/p/7743143.html
for of : es6引入的,可以遍历array、map、set、string、arguments(伪数组),不可以遍历普通对象,可以使用break
、continue
、return
和 throw退出迭代
for in: 遍历普通对象的可枚举属性