How to check if a Javascript variable is an array
Looking for the simplest way to check if a Javascript variable / object is an array? Here’s a simple way on how to check for an Array variable in javascript:
function isArray(variable) {
if (variable.constructor == Array)
return true;
else
return false;
}or better yet, just do this:
function isArray(variable) {
return (variable.constructor == Array);
}








![QRcode[22] QRcode:22](http://www.codestuff.com/wp-content/blogs.dir/7/qrcode-cache/22.jpg)













