创建一个循环遍历 fruits
数组中的每个项目。
var fruits = ["Apple", "Banana", "Orange"];
for (x @(2) @(6)) {
console.log(x);
}
var fruits = ["Apple", "Banana", "Orange"];
for (x of fruits) {
console.log(x);
}
var fruits = ["Apple", "Banana", "Orange"];
for (x in fruits) {
console.log(x);
}