1let list = [4, 5, 6];
2
3for (let i in list) {
4 console.log(i); // "0", "1", "2",
5}
6
7for (let i of list) {
8 console.log(i); // "4", "5", "6"
9}
1const iterable = [10, 20, 30];
2
3for (const value of iterable) {
4 console.log(value);
5}
6// 10
7// 20
8// 30
9