JSFiddle - React, Tailwind, and code Playground

by jrkeller

JavaScript

dojo.declare("myNamespace.CustomClass", null, {
    firstProperty: "The default value",
    constructor:function(params){
        console.log(params);
        dojo.safeMixin(this,params);
    },
    Test: function () {
        alert(this.firstProperty);
    }
});

var myInstance = new myNamespace.CustomClass({firstProperty:'something else'});
myInstance.Test();