Published in: JavaScript
URL: http://javascript.crockford.com/prototypal.html
Note that this will /not/ work: var a = {a:1, b:2} var b = {prototype: a}
function object(o) { function F() {} F.prototype = o; return new F(); }
You need to login to post a comment.
