Skip to content

Instantly share code, notes, and snippets.

@inezabonte
Last active November 15, 2020 21:50
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 inezabonte/5cdc4945dc2df9ccc60301bbe45fab48 to your computer and use it in GitHub Desktop.
Save inezabonte/5cdc4945dc2df9ccc60301bbe45fab48 to your computer and use it in GitHub Desktop.
function hello(name = 'George'){
console.log(`Hello ${name}`)
}
hello()
// Output: => "Hello George"
// Because "George" is the default set name in the parameters
hello('Stacy')
// Output: => "Hello Stacy"
// Because "Stacy" is provided in the arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment