Tuesday, 10 September 2013

Convert static object to dynamic

Convert static object to dynamic

If I have an object like this:
var obj = {};
I can't extend it because it hasn't got any prototype.
Is there any way to convert this object to dynamic so that it's possible
to extend it and use new keyword. Something like:
obj.prototype.property = 'value';
var newobj = new obj;

No comments:

Post a Comment