What character is used to define a template literal in JavaScript?

  • Backtick (`)
  • Dollar sign ($)
  • Hash (#)
  • Exclamation mark (!)
In JavaScript, a template literal is defined using the backtick (`) character. It allows for easy string interpolation and multiline strings, making it a powerful feature for string formatting.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *