Created
December 18, 2016 23:23
-
-
Save gyver98/fa2fe63787721e3a51bb6405d68a87fb to your computer and use it in GitHub Desktop.
Default Values for Function Parameters in ES6
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 greet(greeting, name = "Matthew") { | |
console.log(greeting + ", " + name); | |
} | |
greet("Hello"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment