Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 335 Bytes

File metadata and controls

22 lines (13 loc) · 335 Bytes

Object.create = function(objectPrototype) { function F(){} F.prototype = objectPrototype; return new F(); }

MyClass.prototype = Object.create(SomeBaseClass.prototype);

function clone(object) { function Clone() {} Clone.prototype = object;

return new Clone() }

var parent = { foo: 'foo' } var child = clone(parent)