If you don't need to support IE use template literals. TL are strings that have an easier syntax and extra properties. Here's a comparison between TL and SL (String Literal):
Syntax
SL: Wrap strings in double or single quotes. If the content of string has quotes as well, they should either be escaped by being prefixed with a backslash:
\" and \'
OR use HTML entities:
‘
or ‘
(Left Single QUOtation mark)
’
or ’
(Right Single QUOtation mark)
“
or “
(Left Double QUOtation mark)
”
or ”
(Right Double QUOtation mark)
Note: These particular quotes represented by HTML entities are the curvy or smart quotes type and can only be used in plain text not code. The quotes used in code are straight, do not confuse them as universally accepted they are as different as a comma is to a period.
It's ok to use ’
as an apostrophe - Unicode9.0.0, ch06, pg. 276
TL: Wrap strings in backticks, also called grave accent, On a QWERTY keyboard the key is located at the top left corner `.
`template literal`
Concatenation vs. Interpolation
SL: A mess of single quotes, double quotes, and pluses:
var str = '<input id="'+ID+'" class="form-control">';
TL: Wrap variables and expressions in: ${...}
:
var str = `<input id="${ID}" class="form-control">`;
Demo
var infoCard = {
text: "that aren’t on the battlefield have flash."
};
$("#printCard0").append(`<input type='hidden' name='textCard' value='that aren’t on the battlefield have flash.' id='texting0'>`);
$("#printCard1").append(`<input type='hidden' name='textCard' value='${infoCard.text}' id='texting1'>`);
<main id='core'>
<figure id='printCard0'></figure>
<figure id='printCard1'></figure>
</main>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>