if(Array.isArray(myVarToTest)) { // myVatToTest is an array } else { // myVarToTest is not an array }