Question : check the constructor property to find out if an object is an Array (contains the word "Array"):
Answered by : envious-echidna-7buf6pz36kow
function isArray(myArray) {
return myArray.constructor.toString().indexOf("Array") > -1;
}
Source : http://www-db.deis.unibo.it/courses/TW/DOCS/w3schools/js/js_type_conversion.asp.html | Last Update : Wed, 07 Jul 21