JSFiddle - React, Tailwind, and code Playground

JavaScript

var classFunction = function() {
    this.A = 'B';
    this.GetA = function() {
        return this.A;
    };
    this.SetA = function(v) {
        this.A = v;
    };
}
    
var x = new classFunction();
var b = new something();
b.SetA('test');
alert(x.GetA());
alert(b.GetA());