untuk di JS atau untuk di loop di JS

let list = [10, 11, 12];

for (let i in list) {
   console.log(i); //Display the indices: "0", "1", "2",
}

for (let i of list) {
   console.log(i); // Display the elements: "10", "11", "12"
}
Moscode