title: Pass an Array from Javascript via UIWebView in Swift
body: <p>I have to use <code>UIWebView</code> in my project and I seem that I got a problem.</p>
  
  <p>Well I have html as below.</p>
  
  <pre><code>&lt;html&gt;
  &lt;a onclick="myFunction(1)"&gt;element1&lt;/a&gt;
  &lt;a onclick="myFunction(2)"&gt;element1&lt;/a&gt;
  &lt;a onclick="myFunction(3)"&gt;element1&lt;/a&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I click to the a href link I have to execute my javascript code</p>
  
  <pre><code>&lt;script&gt;
  var arr = [];
  function myFunction(number) {
      arr.push(number);
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>now how I can pass an <code>Array</code> to <code>UIViewController</code>?</p>
  
  <p>and how I know in swift if I call <code>myFunction()</code> from <code>UIWebView</code>? </p>