How to split() a string to an array of integers
<p>I have a string that should be executed as an array: </p>

<pre><code>var q = "The, 1, 2, Fox, Jumped, 3, Over, 4";
var z = q.split(',');
</code></pre>

<p>If I use <code>split()</code>, it will create an array of strings:</p>

<pre><code>[‘The’, '1', '2', ‘Fox’, ‘Jumped’, '3', ‘Over’, '4'] 
</code></pre>

<p>and I don’t need that. I need an array like:</p>

<pre><code>[‘The’, 1, 2, ‘Fox’, ‘Jumped’, 3, ‘Over’, 4]
</code></pre>

<p>indicating which is a string and which is a number.</p>