code: function (array, pred) {
        for (var idx = 0, len = array.length; idx < len; idx ++) {
          var item = array[idx];
          if (pred(item)) {
            return item;
          }
        }
      }
docs: returns item of array