I am currently building a web app and I've found myself doing a lot of string concatenation. What are these more robust and better-abstracted methods? I would love to read up on them. Thanks.
$('<div id="' + identifier + '">' + some_text + '</div>');
If so, consider doing: $('<div>').attr('id', identifier).text(some_text);
which handles escaping correctly for you.Or equivalent in your preferred JS framework or lack of framework.