JavaScript Array isArray() Method

You are Here:

JavaScript Array isArray() Method

The isArray() method returns a Boolean value indicates whether an object is an array.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>Is bike an array?</p> <script> var myNumber = [1, 2, 3, 4, 5, 6, 7]; var bike = { company : "Honda", model : "CBR 1000RR", color : "Red" } //Is bike an array? document.write(Array.isArray(bike)); </script> </body> </html>

Syntax

Array.isArray(value)

Parameter Values

ValueTypeExplanation
valueRequiredSpecifies the value to be tested.

Return Values

ValueExplanation
trueIf the given value is an Array.
falseIf the given value is NOT an Array.

Reminder

Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in JavaScript.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author