3 Ways to Detect an Array in JavaScript

3 ways to check if a value is an array in JavaScript: Array.isArray(), instanceof Array and toString() === ‘[object Array]’.

3 ways to check if a value is an array in JavaScript: Array.isArray(), instanceof Array and toString() === '[object Array]'.
Print Share Comment Cite Upload Translate
CITATION GOES HERE CITATION GOES HERE
Select a language: