how to check if an object is an array or not in javascript code example Example: if object is array javascript Array.isArray(object);