JSFiddle - React, Tailwind, and code Playground

JavaScript

//our base class
function baseClass() {}

//that is class extending base class
function childClass1() {}
childClass1.prototype = new baseClass();

//and another one extending
function childClass2(){}
childClass2.prototype = new baseClass();

//create instances of each child class first
var test1 = new childClass1();
var test2 = new childClass2();
var test3 = new childClass2();

//add another attribute to the base class using prototype
baseClass.prototype.GUID = undefined;
baseClass.prototype.tmpGUID = 0;
baseClass.prototype.setGUID = function()
{
    this.GUID = baseClass.prototype.tmpGUID;
    baseClass.prototype.tmpGUID++;
}
    
//now all child classes see the property with the value we added
    alert( "test1.GUID : " + test1.GUID + "\ntest2.GUID : " + test2.GUID + "\ntest3.GUID : " + test3.GUID);

//we change the property accessing it from one of child classes
test1.setGUID();
test2.setGUID();
test3.setGUID();

//now all child classes have different value of the property
alert( "test1.GUID : " + test1.GUID +"\ntest2.GUID : " + test2.GUID + "\ntest3.GUID : " + test3.GUID );