//判断是否有find方法if(!Array.prototype.find){ Array.prototype.find = function(callback) { return callback && (this.filter(callback) || [])[0]; }; }