We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f85c143 commit 1a7b800Copy full SHA for 1a7b800
Sprint-1/destructuring/exercise-1/exercise.js
@@ -6,10 +6,14 @@ const personOne = {
6
7
// Update the parameter to this function to make it work.
8
// Don't change anything else.
9
-function introduceYourself({ name, age, favouriteFood }) {
+function introduceYourself({
10
+ name = "NO_NAME_PROVIDED",
11
+ age = "NO_AGE_PROVIDED",
12
+ favouriteFood = "NO_FOOD_PROVIDED",
13
+} = {}) {
14
console.log(
15
`Hello, my name is ${name}. I am ${age} years old and my favourite food is ${favouriteFood}.`
16
);
17
}
18
-introduceYourself(personOne);
19
+introduceYourself();
0 commit comments