Array.isArray() method, introduced in ES5:
// True because `fruits` is an array
const fruits = ['Guava', 'Mango', 'Papaya'];
Array.isArray(fruits); // true
// False because `vegetable` is a string
const vegetable = 'Leek';
Array.isArray(vegetable); // false
If you need earlier browser support than IE9—though I can't imagine why—there's a polyfill you can include. Under the hood, it uses the same technique my friend Chris Ferdinandi mentions here: True type checking with vanilla JS.