2 ms·
Strings with interpolation look different in ES6. They don't just look like string literals. You can easily see where the variable substitutions happen. Also,
by ootachi 15y ago
Strings with interpolation look different in ES6. They don't just look like string literals. You can easily see where the variable substitutions happen.
Also, I don't know what your argument about PHP is all about. I don't agree with the idea that string interpolation is going to lead to people writing code vulnerable to SQL injection, for example. You can just as easily write "select * from foo where name=\"" + name + "\"" as `select * from foo where name="${name}"`.
- masklinn 15y ago> You can just as easily write No you can't. You've got 8% more character and 2 switches between string context and expression context. It does not "flow" it's something which is forced on the user by limitations of the language.