JavaScript typeof

The typeof operator returns object for both objects, arrays, and null.

The typeof operator does not return object for functions.