Array.prototype.find(predicate[, thisArg]) returns first item that matches predicate function.
predicate(value, index, collection): takes three arguments
value: current collection element
index: current collection element index
collection: the collection
// as a functionvar find = require('array.prototype.find');find([1, 2], function (x) { return x === 2; }); // 2// to shim itrequire('array.prototype.find').shim();