title: Escape string in jQuery while passing a variable as a parameter
body: <p>I am trying to pass a variable inside a JavaScript function. The problem I'm failing to figure out how to escape string to send that variable inside a double quote. There are tons of answers on this but I couldn't use them correctly.</p>
  
  <pre><code>for (var k = 0; k &lt; districts[division].length; k++) {
      $('#district_list').append('&lt;li class="byebooklist"&gt;&lt;a href="javascript:getUniversity(' + districts[division][k] + ');"&gt;' + districts[division][k] + '&lt;/a&gt;&lt;/li&gt;');
  }
  </code></pre>
  
  <p>How to pass the parameter to the <code>getUniversity()</code> function inside a double quote?</p>