JSFiddle - React, Tailwind, and code Playground

JavaScript

//let's say X is the constructor
var X = function(){};

//and Y is the instance
var Y = new X();

//even after instantiation
X.prototype.add = function(){}
    
//the add method was added to Y via X's prototype
console.log(Y);  

//it's not Y's property, but for all instances of X
var Z = new X();
console.log(Z);