Actually, it's not true because when go for (I in arr) we will get index in i, so inside a loop we can use arr[i] to access an item.
2018 Jan 24, 6:26:25 PM
[1,2,3].__proto__.__proto__ //(Object) a = [1,2,3] (3) [1, 2, 3] for (i in a) console.log ([i]) ["0"] ["1"] ["2"] for (i in [1,2,3]) console.log ([i]) ["0"] ["1"] ["2"]
2018 Jan 21, 7:16:16 PM
Войдите чтобы поставить Нравится
Войдите чтобы прокомментировать