Hi,
I can’t seem to pass test 30 on the Build a Lunch Picker Program. I am not sure what I am doing wrong. Seems like it’s a space issue as far as I can see but I don’t know how to fix it.
When I call showLunchMenu([“Pizza”, “Burger”, “Fries”, “Salad”]) I am getting Menu items: Pizza, Burger, Fries,Salad.
Here is my code:
const showLunchMenu = arr => {
if (arr.length > 0) {
let [first, second, ...rest] = arr;
console.log(`Menu items: ${first}, ${second}, ${rest}`);
} else {
console.log("The menu is empty.");
}
}
Thanks for giving some guidance on how to pass this test.
Suzana