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

BUY
Ξ£JS
JavaScript in Depth

JavaScript in Depth

Basic Syntax

Value Types

Variable

String

Function

Property

Object and Inheritance

Array

Constructor/Class

Iterable 🌟

Misc