Skip to content

JavaScript Array isArray() | Method

  • by

Using Array isArray() method you can test whether the value passed is an Array or not in JavaScript. This method returns true if an object is an array, otherwise false.


The isArray() method, being a static method, is called using the Array class name.

JavaScript Array isArray()

Simple example code ff it finds the passed value is an array, it returns True. Otherwise, it returns False.

<!DOCTYPE html>

    value1 = "JavaScript";

    value2 = 18;

    value3 = [];

    value4 = [1, 2, 3, 4];

    value5 = new Array(3);

    value6 = new Uint8Array(16);




JavaScript Array isArray() Method

Do comment if you have any doubts or suggestions on this JS Array method.

Note: The All JS Examples codes are tested on the Firefox browser and the Chrome browser.

OS: Windows 10

Code: HTML 5 Version

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.