It may be from a different window
(e.g. an iframe), which has an own Object
constructor
var obj = frame.contentWindow.obj;
console.log(obj instanceof Object); // false
console.log(obj instanceof frame.contentWindow.Object); // true
Also note that there is a variety of objects in JS, including "Array objects", "RegExp objects", "Function objects", ... and "Object objects". The typeof
operator is not very helpful there. It can only distinguish between Function objects and other objects.