复制1const groceries = ["banana", "apple", "peanuts"]; 2 3if (groceries.indexOf("banana")) { 4 console.log("We have to buy bananas!"); 5} else { 6 console.log(`We don't have to buy bananas!`); 7}
1const groceries = ["banana", "apple", "peanuts"]; 2 3if (groceries.indexOf("banana")) { 4 console.log("We have to buy bananas!"); 5} else { 6 console.log(`We don't have to buy bananas!`); 7}
本题为“单选题”
题库维护不易,您的支持就是我们最大的动力!