for in, for of
by chalcrow
TypeScript
let myArray = new Array();
myArray.push(4);
myArray.push(6);
for(let i in myArray) {
console.log(i);
}
for(let x of myArray) {
console.log(x);
}
by chalcrow
let myArray = new Array();
myArray.push(4);
myArray.push(6);
for(let i in myArray) {
console.log(i);
}
for(let x of myArray) {
console.log(x);
}