Skip to content

Commit 0668d84

Browse files
Correct nested property destructuring default value example
1 parent e93dc82 commit 0668d84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chapters/ch03.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ Default values can also be provided in nested property destructuring.
477477
----
478478
var { metadata: { enemy = 'Satan' } } = character;
479479
console.log(enemy);
480-
// <- true
480+
// <- Satan
481481
----
482482

483483
For use in combination with aliases, you should place the alias first, and then the default value, as shown next.

0 commit comments

Comments
 (0)