JS: Get Set Prototype

By Xah Lee. Date: . Last updated: .

Get Parent

You can use the following to get a object's parent:

Set Parent

🛑 WARNING: when object's parent change, all the object's children properties also change, due to Prototype and Inheritance .

JavaScript, Get Set Prototype

JavaScript, Object and Inheritance