The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

ES6 Parameter Object Destructuring with Required Values

ES6 Parameter Object Destructuring with Required Values

1:40
Not only can you provide default values when using ES6 parameter object destructuring, but you can also require the presence of certain properties
Watch this lesson now
Avatar
egghead.io

Not only can you provide default values when using ES6 parameter object destructuring, but you can also require the presence of certain properties

Avatar
Igor

Great example! Could you please explain how & why it works? :)

In reply to egghead.io
Avatar
Denis Stoyanov

I think you should provide this article http://www.2ality.com/2016/05/six-nifty-es6-tricks.html (Probably this is source where you got this approach)

Avatar
activedecay

dude. that was smooth. i like this trick.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?