I am writing an easy program the just returns true if an array is sorted else false and I keep getting an exception in eclipse and I just can\'t figure out why. I was wonder
Array.prototype.every
The every() method tests whether all elements in the array pass the test implemented by the provided function.
arr.every(function (a, b) { return a > b; }); var arr = [1,2,3] // true var arr = [3,2,1] // false