Answers for "check the constructor property to find out if an object is an Array (contains the word "Array"):"

0

check the constructor property to find out if an object is an Array (contains the word "Array"):

function isArray(myArray) {

    return myArray.constructor.toString().indexOf("Array") > -1;

}
Posted by: Guest on June-30-2021

Code answers related to "check the constructor property to find out if an object is an Array (contains the word "Array"):"

Code answers related to "Javascript"

Browse Popular Code Answers by Language