Project 3: Recipe Page
JS Wizard
Builds on these lessons
Step 1 of 3
Project
if / else
Given a servings count, write an if/else that logs "Serves a crowd" when it's over 6, and "Serves a family" otherwise. The condition inside if(...) decides which branch actually runs — the other is skipped entirely.
🎯 Your Task
Please add the exact code shown in the light gray box below to your editor.Do not delete your previous code, just insert these new lines in the correct place!
const servings = 8;
if (servings > 6) {
console.log("Serves a crowd");
} else {
console.log("Serves a family");
}