Sometimes you are running a function the return a result in JavaScript. It can return multiple data type. It is hard to detect if the object is an array, because an array is an object.http://idiallo.com/blog/2013/04/javascript-how-do-i-check-if-this-variable-is-an-array