Array Methods: isArray()

By: Dusty Arlia
Published on Monday, February 24, 2014, 08:01 PM
Last Updated on Saturday, July 11, 2015 at 5:20 PM
Total Updates: 2

The isArray() JavaScript method of the Array object tests whether an argument is an array. It does this by checking the argument's (the object you pass to isArray()) class to see if it is an array. Here is two examples:

Array.isArray([]);   //evaluates to true
Array.isArray({});   //evaluates to false

Comments:

Ad: