JavaScript function in a Murder Caused


Rules:
1. All objects have __proto__ property, he points to the prototype constructor
2. The function has a prototype property, pointing to the function prototype
3. functions are objects, so the function also has __proto__ property, pointing to the constructor prototype, which is the constructor function function
4. All functions are examples function
5. All __proto__ prototype function is an example of Object
constructor 6. the built-in function is a function of anonymous and no prototype the function, the Array, Object
7.JavaScript advanced programming functions are each P110 function examples
function F () {}; //
var new new F1 = F (); //
var F0 = f.prototype .__ proto__; / / f0 that the prototype prototype object point f for
the following conclusions:
1. F1 .__. 1 f.prototype proto__ == // rules
2. f .__ proto__ == Function.prototype // rules 3 and. 4
3. f0. __proto __ == f.prototype .__ proto __.__ proto__ == Object.prototype .__ proto __ == null // rule 5 and rule 1
== f.prototype .__ proto __ 4. .__ proto__ the Function.prototype; .__ proto__ the Function.prototype == Object.prototype;
5. The Function Object .__ .__ proto__ proto__ == // constructor built-in functions are the same function
6. Function .__ proto __.__ proto__ == Object.prototype // constructor function built-in function is Object
7. the Object.prototype .__ proto__ == null
8. the typeof (function .__ proto__) == "function"
9. the function .__ proto__ the instanceof Function == false // 7 binding, which proved not to be detected instanceof or regular foolproof method of example 7 is wrong,

Question: instanceof is to detect what; what the Function of __proto__ is, since it is a function prototype property then why not.

Guess you like

Origin www.cnblogs.com/sz-toosimple/p/11441192.html