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

WARNING: when you change a object X's parent, all X's children will be effected for property lookup, due to the Prototype Chain.

JavaScript: Get/Set Prototype

JavaScript Object and Inheritance

BUY
ΣJS
JavaScript in Depth

JavaScript in Depth

Basic Syntax

Value Types

Variable

String

Property

Object and Inheritance

Array

Function

Constructor/Class

Iterable 🌟

Misc