Object instanceof Object
true
Object instanceof Function
true
Function instanceof Object
true
Function instanceof Function
true
so if Function is an Object and the Object is a Function how come
Function === Object
and Function == Object
are false?
I do understand that checking the instance of an object is not the same as comparison. So the question here is the fuzziness in the case where if two objects (which are actually types) are instances of each other, shouldn't the types be the same?
Note: Object is not an instance of a Number or an Array just an instance of Function.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…