Skip to content

Instantly share code, notes, and snippets.

@BennisonDevadoss
Created June 2, 2022 15:20
Show Gist options
  • Save BennisonDevadoss/15b6396369ab18102326c3973d691de3 to your computer and use it in GitHub Desktop.
Save BennisonDevadoss/15b6396369ab18102326c3973d691de3 to your computer and use it in GitHub Desktop.
let firstName = "Bennison"
let lastName = undefined
if(lastName){
console.log(`Hello ${firstName} ${lastName}`);
}
else{
console.log(`Hello ${firstName}`); // Bennison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment