JSFiddle - React, Tailwind, and code Playground
JavaScript
var obj = {
one : "A",
two : "B",
fnA : function() {
this.fnB(); // without fnB method console log will display A B, with fnB it will display C D
console.log(this.one + " " + this.two);
},
fnB : function() {
this.one = "C";
this.two = "D";
}
};
obj.fnA();