Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
oatkiller edited this page Sep 13, 2010 · 3 revisions

Filter acts on an array or object and takes a fn as a test. it returns a new object or array containing only the elements that passed the test

(function () {

[1,2,3,4][o.filter](function (i) {
	return i % 2;
});
// returns a new array [1,3];

})();