I recently found out, that it's possible to use code like this (notice the backtick, instead of quote):
var test = '123';
var x = `test: ${test}`; // => test: 123
I don't quite know how to search this, so since i only seen people use this:
var test = '123';
var x = 'test: ' + test; // => test: 123
I haven't seen people use this, so i wanted to know, what are the drawbacks?
Cos this seems like cleaner way to write strings with variables in them.. I mean, in this example it might seem a bit silly, but if you have long string with multiple repeating variables, then this is much more readable, than using +
all the time.
EDIT: This question has been marked as duplicate, but i don't see answer to my question.. I'm not asking, whats the difference. I'm asking what are the drawbacks of using this in all my code in the future. Are there javascript or browser version support, i have to worry about?