JavaScript: max of an array not working
<p>I have this javascript code: <a href="http://jsfiddle.net/MvWV7/5/" rel="nofollow">http://jsfiddle.net/MvWV7/5/</a></p>

<p>What I'm trying to achieve is that user should fill the inputs starting with 1. After the user types 1 the next value must be 2 (not nanother number) and so on.</p>

<p>I'm trying to fill the inputs values in an array by doing this (as shown in the fiddle):</p>

<pre><code>var ary = [];   
$(".activity_order").not(self).each(function(t) {ary.push(this.value);})
</code></pre>

<p>but when I do</p>

<pre><code>ary.max()
</code></pre>

<p>I get</p>

<pre><code>Uncaught TypeError: Object ,,,,,,,, has no method 'max' 
</code></pre>

<p>In console when I do <code>ary.max()</code> i get 0 if there's no numbers</p>

<p><strong>UPDATE</strong></p>

<p>My fault, I was using google console in jsfiddle and I started to look up for array methods inside.
When I did ary.max() it gives 0</p>
