Created
January 10, 2021 04:48
-
-
Save rahulmalhotra/f27c35f011404b63a9c50f8e69a12943 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
function add(a, b) { | |
b = b ? b : 2; | |
console.log(a+b); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment