Is there anyway to reassign an instance object’s prototype?
Something like this:
var parent = {prop: 'parent.prop'};
var child = Object.create(parent);
child.prototype = {prop: 'other'};
child.prop; // 'other'
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Only with the non-standard
__proto__property, which I believe is deprecated in the environments that support it.