Mein Code erstreckt, ist wie folgt:Javascript - Fehlerobjekt
function Example(){}
Example.myMethod = function(){};
function SpecificExample(){}
SpecificExample.prototype = Object.create(Example.prototype);
SpecificExample.prototype.constructor = SpecificExample;
Ich möchte SpecificExample
Example
erstreckt. Warum funktioniert dieser Code nicht?
'Example.myMethod = function() {};' ist eine Funktion zum Konstruktor angebracht, kein Prototyp Methode verwenden 'Beispiel. prototype.myMethod = function() {}; ' – somethinghere