title: Multiple var inside onclick: Strings and Int
body: <p>Currently I have this code </p>
  
  <pre><code>function myFunction(arr)
  {
   var out = "&lt;br /&gt;";
   var i;
  
   if(arr.length &gt; 0)
   {
    for(i = 0; i &lt; arr.length; i++)
    {
     out += "&lt;div class='address container-fluid card svs-map-add' title='Show Location and Coordinates' onclick='chooseAddr(" + arr[i].lat + ", " + arr[i].lon + ");return false;'&gt;" + arr[i].display_name + "&lt;/div&gt;";
    }
    document.getElementById('results').innerHTML = out;
   }
   else
   {
    document.getElementById('results').innerHTML = "Sorry, no results...";
   }
  
  }
  </code></pre>
  
  <p>As you can see here I'm passing 2 variables and it contains <code>latitude</code> and <code>longitude</code></p>
  
  <p><code>onclick='chooseAddr(" + arr[i].lat + ", " + arr[i].lon + ");return false;'</code></p>
  
  <p>These variables will go to function <code>chooseAddr</code></p>
  
  <p>Currently it's working fine</p>
  
  <p>But now I need to include <code>1 more</code> variable and it's </p>
  
  <p><code>arr[i].display_name</code></p>
  
  <p><code>Uncaught SyntaxError: Unexpected end of input</code></p>
  
  <p>What I have done right now is </p>
  
  <pre><code>  onclick='chooseAddr(" + arr[i].lat + ", " + arr[i].lon + ", \'" + arr[i].display_name + "\');return false;'
  </code></pre>
  
  <p>But there's an error with that syntax</p>
  
  <p>How can I pass the <code>display_name</code> variable since this variable is <code>String</code></p>