Skip to content

Instantly share code, notes, and snippets.

@IhwanID
Created November 2, 2025 09:27
Show Gist options
  • Save IhwanID/7f74276b32cf23ad71d64da01e52dcc2 to your computer and use it in GitHub Desktop.
Save IhwanID/7f74276b32cf23ad71d64da01e52dcc2 to your computer and use it in GitHub Desktop.
String Literal Example
const firstName = "Ihwan"
const lastName = "Dede"
const oldWay = "Halo nama saya " + firstName + " " + lastName
console.log(oldWay)
const a = 10
const b = 5
const newWay = `Halo nama saya ${firstName} ${lastName}
Saya dari Majalengka
hasil dari ${a} + ${b} = ${a+b}
`
console.log(newWay)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment