for of 与 for in

参考: https://www.cnblogs.com/m2maomao/p/7743143.html

for of : es6引入的,可以遍历array、map、set、string、arguments(伪数组),不可以遍历普通对象,可以使用breakcontinuereturn 和 throw退出迭代

for in: 遍历普通对象的可枚举属性

原文地址:https://www.cnblogs.com/lurending0417/p/10514962.html