Created
January 3, 2020 08:51
-
-
Save tilleps/316682e036aa73af3cedb14464a30321 to your computer and use it in GitHub Desktop.
Require parameters for Javascript: https://davidwalsh.name/javascript-function-parameters
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
function test(a = foo(arguments)) { | |
console.log(a, typeof a); | |
} | |
function foo(args) { | |
console.log('foo', args) | |
} | |
console.log(test(undefined, undefined, undefined)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment