title: How to return an array from javascript? (ExecuteScript)
body: <p>Although returning a string is cake, I just can't figure out how to return an array, this is an example that does not work (myURLs is a global array variable):</p>
  
  <pre><code>       List&lt;object&gt; list = ((IJavaScriptExecutor)driver).ExecuteScript(
          "window.myURLs = ['aa']; window.myURLs.push('bb'); return window.myURLs" 
          ) as List&lt;object&gt;;
  </code></pre>
  
  <p>The error is: Object reference not set to an instance of an object.</p>
  
  <p>If anyone has an example of returning an array I would love to see it!</p>