Discussion on: Default Parameters in ES6

karfau profile image
Christian Bewernitz

Well, it is the default for the first argument.
So you can call the function with no argument.
If it wouldn't be there, calling it without an argument, destruction leads to a TypeError of can not access property 'foo' of undefined.

Thread Thread
sarah_chima profile image