title: Pass array parameter to XMLHttpRequest object
body: <p>How can i pass an array object to my url parameters on XMLHttpRequest?
  I have tried to pass my_array but the object is undefined. But if i put a console.log of my_array on anonymous function the object is filled correctly    </p>
  
  <pre><code>var xmlhttp = new XMLHttpRequest();
  var url = "exampleUrl="+my_array+"&amp;api_key="+api+"&amp;format=json";
  
  xmlhttp.onreadystatechange = function() {
      if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) {
          my_array = JSON.parse(xmlhttp.responseText);
          //console.log(my_array);
      }
  };
  xmlhttp.open("GET", url, true);
  xmlhttp.send();
  </code></pre>