In JavaScript, a backtick† seems to work the same as a single quote. For instance, I can use a backtick to define a string like this:
var s
Backticks in JavaScript is a feature which is introduced in ECMAScript 6 // ECMAScript 2015 for making easy dynamic strings. This ECMAScript 6 feature is also named template string literal. It offers the following advantages when compared to normal strings:
''
or ""
) are not allowed to have linebreaks.${myVariable}
syntax.const name = 'Willem';
const age = 26;
const story = `
My name is: ${name}
And I'm: ${age} years old
`;
console.log(story);
Template string literal are natively supported by all major browser vendors (except Internet Explorer). So it is pretty save to use in your production code. A more detailed list of the browser compatibilities can be found here.