JSFiddle - React, Tailwind, and code Playground

by pj_js15

JavaScript

var MyMath = function (){
    //this.a = a;
    //this.b = b;
    
    this.add = function(a, b){
        //return this.a + this.b;        
        return a + b;
    }    
}

var test = new MyMath();
    
alert( test.add(1, 2) );