Last active
March 1, 2018 09:03
-
-
Save SaschaHeyer/8745d61f834b5836bf7bb2a1e862efac to your computer and use it in GitHub Desktop.
defaultFunctionParamters
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
| var addBeer = function(name, category = 'Pils') { | |
| console.log(name + ' ' + category); | |
| }; | |
| addBeer(); // output: undefined Pils | |
| addBeer('Bitburger'); // output: Bitburger Pils | |
| addBeer('Bolten', 'Alt'); // output: Bolten Alt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment