JSFiddle - React, Tailwind, and code Playground

by hammerbrostime

JavaScript

function constructorQuestion() {
    alert("this is the original constructor");
};

c = new constructorQuestion();

constructorQuestion.prototype.constructor = function() {
    alert("new constructor");
}


//howComeConstructorHasNotChanged = new constructorQuestion();

howComeConstructorHasNotChanged = new constructorQuestion.prototype.constructor;