Tell us what’s happening:
Passing an array as an argument to the function seems not to work. My current coede: function getShoppingListMsg(shoppingListArray) {
return “Current Shopping List: " + shoppingListArray.join(”, ");
}
Tried different variations of it. Can someone please tell me where the mistake is?
Your code so far
console.log("Grocery shopping list");
const shoppingList = [];
console.log("It will be nice to have some fruit to eat.");
shoppingList.push("Apples");
// User Editable Region
function getShoppingListMsg(shoppingListArray) {
return "Current Shopping List: " + shoppingListArray.join(", ");
}
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Challenge Information:
Build a Shopping List - Step 5