The Array some() method

Report a typo

You made a shopping list with a few items. You are unsure if you put bananas on the shopping list, so you want to check just in case. The following program is checking whether the array called shoppingList has the item Banana in it:

const shoppingList = ["Banana", "Bread", "Avocado", "Goji Berries"];

console.log(shoppingList.some(checkShoppingList))

function checkShoppingList(groceries) {
  return groceries == "Banana" ;
}

What will be the output to the console? Write a single-word answer.

Enter a short text
___

Create a free account to access the full topic