title: Return a string array in jquery function
body: <p>I'm trying to return a string array. It needs to be in format:</p>
  <pre><code>Area: [&quot;0&quot;,&quot;1&quot;,&quot;2&quot;]
  </code></pre>
  <p>So this works</p>
  <pre><code>Area:  ($(&quot;#output&quot;).find('.pvtUi .pvtRows').text())!=null ?[&quot;0&quot;]: [&quot;1&quot;,&quot;2&quot;]
  </code></pre>
  <p>but not this one</p>
  <pre><code>Area:  function(){                              
  if ($(&quot;#output&quot;).find('.pvtRows').text()!=null) {
  val=[&quot;0&quot;];
  return val;}
  else return [&quot;1&quot;,&quot;2&quot;];
  }
  </code></pre>
  <p>I've tried all sorts of options. I'm trying to return inclusion list for pivottable.js
  <a href="https://github.com/nicolaskruchten/pivottable/wiki/Parameters" rel="nofollow noreferrer">https://github.com/nicolaskruchten/pivottable/wiki/Parameters</a>
  any help would be appreciated...</p>