Skip to content

Latest commit

 

History

History
15 lines (14 loc) · 457 Bytes

README.md

File metadata and controls

15 lines (14 loc) · 457 Bytes

ie-Array.find

Adds support for the Array.prototype.find() function in Internet Explorer

In order to add the functionality of array.find() to internet explorer, add this to the top of your script:

if(typeof Array.prototype.find === 'undefined'){
	Array.prototype.find = function(callback, thisArg){
		for(var i = 0; i < this.length; i++){
			if(callback.call(thisArg || window, this[i], i, this))
				return this[i];
		}
		return undefined;
	};
}