Math.min.apply returns 0 for null
<p>I would like to get minimum value from an array. If the data contains <code>null</code> value, <code>Math.min.apply</code> returns <code>0</code> for <code>null</code> value. Please see <a href="http://jsfiddle.net/jeryslo/7DCXw/" rel="nofollow">this JSFiddle example</a>. How can I get true minimum value even if null value exists in array?</p>

<p>Code (same as in JSFiddle example):</p>

<pre><code>var arrayObject= [ {"x": 1, "y": 5}, {"x": 2, "y": 2}, {"x": 3, "y": 9}, {"x": 4, "y": null}, {"x": 5, "y": 12} ];

var max = Math.max.apply(Math, arrayObject.map(function(o){return o.y;}));
var min = Math.min.apply(Math, arrayObject.map(function(o){return o.y;}));

$("#max").text(max);
$("#min").text(min);
</code></pre>
