首页 > 代码库 > What is happening in Crockford's object creation technique?

What is happening in Crockford's object creation technique?

 

 

What is happening in Crockford‘s object creation technique?

http://stackoverflow.com/questions/2766057/what-is-happening-in-crockfords-object-creation-technique

 

//创建对象    if (typeof Object.create !== "function") {        Object.create = (function () {            function F() {} // created only once            return function (o) {                F.prototype = o; // reused on each invocation                return new F();            };        })();    }