JavaScript setPrototypeOf() method

The Javascript handler setPrototypeOf() method modifies the prototype of an object. Syntax: setPrototypeOf: function(target, prototype) Parameters: target: It represents the target object. prototype: It represents the new prototype of the object. It can be null. Return: Returns true if the prototype of the object changed successfully otherwise returns false. Example: <!DOCTYPE html> <html> <body> <script> … Read more