Array.prototype.foo = "foo!"; var array = ['a', 'b', 'c']; for (var i in array) { console.log(array[i]); } Run code snippet
let arr = [1, 2, 3]; for(let i = 0; i < arr.length; i++){ console.log(arr[i]); }