What is the original value of Object,object for the object type? The need to use constructor prototype,constructor means that the function has a default property prototype, and this prototype.valueof constructor defaults to the original value of the function. Object.constructor.valueof () can output the original value of the object and output it as function function () {[native code]}. But now the browser can directly output the original value of alert (Object).
Now let's take a look at the object usage, the var o = new Object () instance O needs a new object object, and also this O has the prototype property of the object, as well as the use of a function function, as well as the o[parameter], From the above object primitive value can be seen.
O.prototype; O[value]; O=function () {}o={}
So we direct alert (object ()), the output is [Object Object], then what does this divine horse mean? Why not an object? Because the second object is a class , in the JavaScript world, object class is actually an object, so you should be able to understand object. Then the valueof the object method has 5 types, respectively: ' Object ', ' string ', ' Undefined ', ' boolean ', ' number '. If this value is not (null,undefined), it is the object that is output above. If the object method has one of the 5 types in the above, the parameter valueinside the method is output.
JavaScript: Understanding Object