Created
January 10, 2021 04:55
-
-
Save rahulmalhotra/a1336615f6ceb63b66802de7f2d453b0 to your computer and use it in GitHub Desktop.
This code snippet is used in Default Parameters in ES6 JavaScript Tutorial for SFDC Stop
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
// * Default value using ES6 syntax | |
function add(a, b = 2) { | |
console.log(a+b); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment