setPrototypeOf

fun setPrototypeOf(target: Any, proto: Any?): Boolean(source)

Sets the prototype of a specified object o to object proto or null.

Return

Whether setting the prototype was successful.

Parameters

target

The object to change its prototype.

proto

The value of the new prototype or null.