Function setPrototypeOf

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

    Parameters

    • target: object

      The object to change its prototype.

    • proto: object

      The value of the new prototype or null.

    Returns boolean

    Whether setting the prototype was successful.