filter Creates a new array with all elements that pass
the test implemented by the provided function.
>>> 'abc'.filter(function(e){return e!='b'})
TypeError: "abc".filter is not a function
>>> Array.prototype.filter.call('abc', function(e){return e!='b'})
["a", "c"]
>>> jQuery.isArray('abc')
false
All array methods are generic; i.e., they work on any object with numeric properties plus a
lengthproperty. See the specification forArray.prototype.filter, for example: note that the algorithm is phrased entirely in terms of things likeor
Array.filteris a Firefox-specific extension, BTW. The cross-browser version isArray.prototype.filter.call.