Создайте цикл, который проходит через каждый элемент в массиве fruits
.
const fruits = ["Яблоко", "Банан", "Апельсин"];
for (x @(2) @(6)) {
console.log(x);
}
const fruits = ["Яблоко", "Банан", "Апельсин"];
for (x of fruits) {
console.log(x);
}
const fruits = ["Яблоко", "Банан", "Апельсин"];
for (x in fruits) {
console.log(x);
}