javascript check if is array

JavaScript
Array.isArray(variableName)var colors=["red","green","blue"];

if(Array.isArray(colors)){
    //colors is an array
}function isArray(value) {
    return Object.prototype.toString.call(value) === "[object Array]";
}
Source

Also in JavaScript: