Build a Lunch Picker Program - test 30

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

What method can you apply to arr to make sure the array elements have the separators you want?

Thanks @dhess, got it :+1: