JavaScript: Get/Set Prototype

By Xah Lee. Date: . Last updated: .

Get Parent

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

Set Parent

Note: when you change a object X's parent, all X's children will be effected for property lookup, due to the prototype chain.

JavaScript Object and Inheritance

βˆ‘ JS in Depth
XAH Β BUY NOW

JS in Depth

JS Obj Ref

DOM


JS in Depth

Basic Syntax

Value Types

Variable

String

Function

Property

Object and Inheritance

Array

Constructor/Class

Iterable 🌟

Misc