PROWAREtech

articles » current » javascript » ie11 » ie11-prototype-array-isarray

JavaScript: IE11 Array.isArray() Method/Function

Create the Array.isArray() function for Internet Explorer 11.

Still developing for IE11? Well, the Array.isArray() function is used to detect arrays on IE11.


Array.isArray = Array.isArray || function (arg) {
	return Object.prototype.toString.call(arg) == "[object Array]";
};

Using the above code snippet:


Array.isArray = Array.isArray || function (arg) {
	return Object.prototype.toString.call(arg) == "[object Array]";
};
alert("[]=" + Array.isArray([]));

This site uses cookies. Cookies are simple text files stored on the user's computer. They are used for adding features and security to this site. Read the privacy policy.
CLOSE