title: how to use jQuery "autocomplete source" inside JavaScript for loop?
body: <p>I have some jQuery code:</p>
  
  <pre><code>$("#autocomplete").autocomplete({
  
              source: [
                  "Test0", "Test1", "Test2", "Test3"
              ]
          });
  </code></pre>
  
  <p>instead of static source I need to read it from array.. I am getting it, and now want to give it out with for loop like this but it doesn't work!</p>
  
  <pre><code> for (var i = 0; i &lt; orgUnits.length; i++) {
  
              debugger;
              var city = orgUnits[i];
  
              $("#autocomplete").autocomplete({
  
                  source: [
                     city
                  ]
              });
          }
  </code></pre>