Skip to main content Accessibility Feedback

Array.isArray()

Pushes support back to at least IE6.

/**
 * Array.isArray() polyfill
 */
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
if (!Array.isArray) {
	Array.isArray = function(arg) {
		return Object.prototype.toString.call(arg) === '[object Array]';
	};
}