Skip to content

Instantly share code, notes, and snippets.

@QuocCao-dev
Created September 24, 2022 09:44
Show Gist options
  • Save QuocCao-dev/958852e1b46b05e6a0eb561a330f7548 to your computer and use it in GitHub Desktop.
Save QuocCao-dev/958852e1b46b05e6a0eb561a330f7548 to your computer and use it in GitHub Desktop.
function greeting(name){
if(name === undefined){
name = 'user'
}
return 'Hello '+ name;
}
console.log(greeting())
@QuocCao-dev
Copy link
Author

const greeting = (name = "user") => `Hello ${name}`;

console.log(greeting('Quoc'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment