Javascript Array elementMatchingFunction(func)
Array.prototype.elementMatchingFunction = function(func) { "use strict"; var index = this.indexOfMatchFunction(func); if (index < 0) return null; return this[index]; };