when Xiaobai looks at something, he sees that the basic data type can be detected by instanceof
, constructor
and other methods
then my custom var a = "hello worldview";
also uses these two methods to detect. So does it mean that the basic data types are all instantiated objects of the constructor?
uses an instanceof String
returns false
a.__proto__.constructor = function String []
instanceof method cannot be detected directly, but why can constructor return the constructor of String