Js is a function method used to detect class array objects, js Array
As follows:
// Determine whether o is a class array object // strings and functions have the length attribute, But they // can be excluded by typeof detection. In the JavaScript client, DOM text nodes // also have the length attribute. You need to use the extra judgment o. nodeType! = 3 exclude function isArrayLike (o) {if (o & // o non-null/undefined and other typeof o === "object" & // o is the object isFinite (o. length) & // o. length is a finite value o. length> = 0 & // and non-negative o. length = Math. floor (o. length) & // and is an integer o. length <4294967296) {// and less than 2 ^ 32 return true; // then o is a class array object} else {return false; // otherwise not }}
Array object: an object with a length attribute and a non-negative integer attribute, such as an arguments object and an object returned by some DOM methods.
The above js function method used to detect class array objects is all the content shared by the editor. I hope to give you a reference, and I hope you can also support the help house.