Object.prototype.toString.call(myVar) will return:
- [object Object]
"[object Object]"if myVar is an object - [object Array]
"[object Array]"if myVar is an array - etc.
For more information on this and why it is a good alternative to typeof, check out this article.