JavaScript para de
const array = ['hello', 'world', 'of', 'Corona'];
for (const item of array) {
console.log(item);
}
2 Programmers 1 Bug
const array = ['hello', 'world', 'of', 'Corona'];
for (const item of array) {
console.log(item);
}
let arr = ["a", "b", "c"]
for (let i in arr){
console.log(i) // 0, 1, 2
}
for(let i of arr){
console.log(i) // a, b, c
}
let colors = ['Red', 'Blue', 'Green'];
for (let color of colors){
console.log(color);
}
const array1 = ['a', 'b', 'c'];
for (const element of array1) {
console.log(element);
}
const numbers = [1,2,3,4];
for(const item of numbers){
console.log(item);
}
const cars = ["BMW", "Volvo", "Mini"];
let text = "";
for (let x of cars) {
text += x;
}