Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const fun = function(options = { prop: 'default'}) { console.log(options.prop)}
- fun({a: 'x', prop: 'hello'}) ... // log: 'hello'
- fun({a: 'x'}) ... // log: 'default'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement