Skip to content

Commit 1a7b800

Browse files
Apply changes asked by the reviewer
1 parent f85c143 commit 1a7b800

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Sprint-1/destructuring/exercise-1/exercise.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ const personOne = {
66

77
// Update the parameter to this function to make it work.
88
// Don't change anything else.
9-
function introduceYourself({ name, age, favouriteFood }) {
9+
function introduceYourself({
10+
name = "NO_NAME_PROVIDED",
11+
age = "NO_AGE_PROVIDED",
12+
favouriteFood = "NO_FOOD_PROVIDED",
13+
} = {}) {
1014
console.log(
1115
`Hello, my name is ${name}. I am ${age} years old and my favourite food is ${favouriteFood}.`
1216
);
1317
}
1418

15-
introduceYourself(personOne);
19+
introduceYourself();

0 commit comments

Comments
 (0)