Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulmalhotra/a1336615f6ceb63b66802de7f2d453b0 to your computer and use it in GitHub Desktop.
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
// * 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