mozilla

Compare Revisions

Object.create()

Change Revisions

Revision 399181:

Revision 399181 by BrianDiPalma on

Revision 416577:

Revision 416577 by -TNO- on

Title:
Object.create
Object.create
Slug:
JavaScript/Reference/Global_Objects/Object/create
JavaScript/Reference/Global_Objects/Object/create
Tags:
"ECMAScript5", "JavaScript 1.8.5", "enumerable", "prototype", "editable", "configurable", "JavaScript"
"ECMAScript5", "JavaScript 1.8.5", "enumerable", "prototype", "editable", "configurable", "JavaScript"
Content:

Revision 399181
Revision 416577
n293    Object.create = function (o) {n293    Object.create = (function(){
294        function F(){}
295 
296        return function(o){
294        if (arguments.length > 1) {297            if (arguments.length != 1) {
295            throw new Error('Object.create implementation only ac298                throw new Error('Object.create implementation onl
>cepts the first parameter.');>y accepts one parameter.');
299            }
300            F.prototype = o
301            return new F()
t297        function F() {}t303    })()
298        F.prototype = o;
299        return new F();
300    };

Back to History