JSFiddle - React, Tailwind, and code Playground
JavaScript
var x = new foo;
x.do();
function foo() {
this.that = 'those';
var self = this;
this.do = function() {
alert(self.that);
}
}
var x = new foo;
x.do();
function foo() {
this.that = 'those';
var self = this;
this.do = function() {
alert(self.that);
}
}