Skip to content

Commit 004337d

Browse files
committed
Fixed function parameter to use object destructuring
1 parent ad2458b commit 004337d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ 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({name, age, favouriteFood}) {
1010
console.log(
1111
`Hello, my name is ${name}. I am ${age} years old and my favourite food is ${favouriteFood}.`
1212
);

0 commit comments

Comments
 (0)