Template literals with nested backticks(`) in ES6
<p>How can I write a template literal in ECMAScript&nbsp;6 that will contain backticks(`) in and by itself, (i.e. nested backticks)?</p>

<p>For example:</p>

<pre><code>var query = `
  UPDATE packet
  SET
  `association` = "3485435",
  `tagname` = "associated"
 `
</code></pre>

<hr>

<p>The reason I need it:</p>

<p>It's quite obvious in my code example above.</p>

<p>I'm trying to build <a href="https://github.com/felixge/node-mysql" rel="noreferrer">node-mysql</a> queries as <code>Strings</code> and store them in a variable for passing them to MySQL. The MySQL query syntax requires back ticks for <code>UPDATE</code>-style queries.</p>

<ul>
<li><p>The only way I can have them look neat &amp; tidy is by using template literals, otherwise the queries using regular single-line strings look awful because they end up being very long is some cases.</p></li>
<li><p>I also want to avoid terminating lines using <code>\n</code> as it's cumbersome.</p></li>
</ul>