Skip to content

Commit e82bb78

Browse files
committed
add recipe.js
1 parent cf51180 commit e82bb78

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎Sprint-2/debug/recipe.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Predict and explain first...
2-
2+
// the code might print something like this bruschetta serves 2
3+
//ingredients: [object Object] because the ${recipe} is an object and we only trying to print the
4+
// ingredients inside the object
35
// This program should log out the title, how many it serves and the ingredients.
46
// Each ingredient should be logged on a new line
57
// How can you fix it?
@@ -11,5 +13,5 @@ const recipe = {
1113
};
1214

1315
console.log(`${recipe.title} serves ${recipe.serves}
14-
ingredients:
15-
${recipe}`);
16+
ingredients:
17+
${recipe.ingredients.join("\n")}`);

0 commit comments

Comments
 (0)