Javatpoint Logo
Javatpoint Logo

JavaScript handler.setPrototypeOf() Method

The handler.setPrototypeOf method returns a Boolean value true if [[Prototype]] was successfully changed. Otherwise, it will return false. It is a trap for Object.setPrototypeOf().

Syntax

Parameters

target: The target object.

prototype: The object's new prototype or null.

Return value

Return a Boolean type value.

Browser Support

Chrome Compatibility unknown
Edge Compatibility unknown
Firefox 49
Opera Compatibility unknown

Example 1

Test it Now

Output:

true

Example 2

Test it Now

Output:

false

Example 3

Test it Now

Output:

false
false

Next TopicJavaScript handler





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA