I recently found out about JavaScript's Template Literals, and they help a lot with readability. But would it be worth changing my code from now on to these Template Literals, or should I keep using Strings?
Example of Template Literal vs. String
String
var name = {
first: John,
last: Smith
};
'Hello' + name.first + name.last + '.';
Template Literal
var name = {
first: John,
last: Smith
};
`Hello ${name.first + name.last}.`;
As you can see above, they help a lot with readability (as I stated above), but when reading the MDN page, it seems to not be fully supported by all browsers. Android default, IE, and IE mobile don't support it. While IE is notoriously bad, it is still widely used. I don't want to make a script using Template Literals and have most of the users use IE.
Would using the Template Literals over Strings be worth the change?