Last active
September 14, 2018 11:08
-
-
Save vsnikkil/d729dd824f1de1d05e4cdcf67202ee57 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// does not work on edge | |
((a, {b = 0, c = 3}) => { return a === 1 && b === 2 && c === 3; })(1, { b: 2 }); | |
// works, surprisingly | |
((a, {b = 0, c = 3} = {}) => { return a === 1 && b === 2 && c === 3; })(1, { b: 2 }); | |
// works | |
(({b = 0, c = 3}) => { return b === 2 && c === 3; })({ b: 2 }); | |
// works | |
((a, {b = 0, c = 3} = undefined) => { return a === 1 && b === 2 && c === 3; })(1, { b: 2 }); | |
// also works | |
(({b = 0, c = 3}, a) => { return a === 1 && b === 2 && c === 3; })({ b: 2 }, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment