YouTip LogoYouTip

Jsref Isarray

# JavaScript isArray() Method [![Image 3: Array Object Reference](#) JavaScript Array Object](#) ## Example Determine if an object is an array: function myFunction(){var fruits = ["Banana", "Orange", "Apple", "Mango"]; var x = document.getElementById("demo"); x.innerHTML = Array.isArray(fruits); } [Try it Β»](#) * * * ## Definition and Usage The isArray() method is used to determine whether an object is an array. If the object is an array, it returns true; otherwise, it returns false. * * * ## Browser Support The numbers in the table indicate the first browser version that fully supports the method. | Method | | | | | | | --- | --- | --- | --- | --- | --- | | isArray() | 5 | 9.0 | 4 | 5 | 10.5 | * * * ## Syntax Array.isArray(obj) ## Parameter Parameter Description _obj_ Required. The object to be tested. ## Technical Details | Return Value: | Boolean. Returns true if the object is an array, otherwise returns false. | | --- | | JavaScript Version: | ECMAScript 5 | * * JavaScript Array Object](#)
← Jsref KeysPhp Var_Export Function β†’