От: | Serginio1 | https://habrahabr.ru/users/serginio1/topics/ | |
Дата: | 22.03.17 16:44 | ||
Оценка: |
TSP>var arr=['10', '10', '10']
TSP>for( item in arr ) console.log(parseInt(item))
TSP>
let list = [4, 5, 6];
for (let i in list) {
console.log(i); // "0", "1", "2",
}
for (let i of list) {
console.log(i); // "4", "5", "6"
}