const array1 = [‘a‘, ‘b‘, ‘c‘];
for (const element of array1) {
console.log(element);
}
// expected output: "a"
// expected output: "b"
// expected output: "c"
for (variable of iterable) {
//statements
}
variableiterable原文:https://www.cnblogs.com/xiaoxiaoxun/p/12123627.html