-
-
Save amar9312/5d913228458ee5e846fa2b8d0dce1711 to your computer and use it in GitHub Desktop.
This file contains 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 myFn(variable1, variable2) { | |
variable2 ??= " default value" | |
return variable1 + variable2 | |
} | |
myFn("this has", " no default value") //returns "this has no default value" | |
myFn("this has no") //returns "this has no default value" | |
myFn("this has no", 0) //returns "this has no 0" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
myFn is debugged now.