Build a lunch picker program lab in Javascript

It says i have a syntax error on line 48? Im stumped.

let lunches = [];

function addLunchToEnd(lunches, lunchItem) {
lunches.push(lunchItem);
console.log(`${lunchItem} added to the end of the lunch menu.`);
return lunches;
}

function addLunchToStart(lunches, lunchItem) {
lunches.unshift(lunchItem);
console.log(`${lunchItem} added to the start of the lunch menu.`);
return lunches;
};

function removeLastLunch(lunches) {
if (lunches.length === 0) {
console.log("No lunches to remove.");
} else {
let lunchItem = lunches.pop();
console.log(`${lunchItem} removed from the end of the lunch menu.`);
}
return lunches;
};

function removeFirstLunch(lunches) {
if (lunches.length === 0) {
console.log("No lunches to remove.");
} else {
let lunchItem = lunches.shift();
console.log(`${lunchItem} removed from the start of the lunch menu.`);
}
return lunches;
}

function getRandomLunch(lunches) {
const arrLength = lunches.length;
const random = Math.floor(Math.random() * lunches.length);
const randomLunch = lunches[random];
if (lunches.length === 0) {
console.log("No lunches available.");
} else {
return console.log(`Randomly selected lunch: ${randomLunch}`);
}
}

function showLunchMenu(lunches) {
if (lunches.length > 0) {
console.log(`Menu items: ${lunches}`);
return lunches;
} else {
console.log("The menu is empty.");
return "The menu is empty.";
}
}

showLunchMenu([" Greens ", " Corn ", " Beans "]);

showLunchMenu(["Pizza", "Burger", "Fries", "Salad"]);

Hi

Can you please link to the url of the step you are on.

Is this what you mean by the link? Because it’s set up as a lab instead of a workshop so it’s not divided into steps…

Hi

You haven’t cut and past the array for the first test case correctly, copy it again from test 29.

For your second one, the console is displaying:

“Menu items: Pizza,Burger,Fries,Salad”

The instructions says it should display:

“Menu items: Pizza, Burger, Fries, Salad” (with spaces after the commas).

You need to work on this line of the function to display it with spaces. Do you remember how to do this?

console.log(`Menu items: ${lunches}`);