JSFiddle - React, Tailwind, and code Playground
JavaScript
var Test = function () {
this.init();
};
Test.prototype = {
init: function () {
var foo = this.foo;
var bar = this['bar'];
foo();
bar();
},
foo: function () {
console.log('foo');
},
bar: function () {
console.log('bar');
}
};
var test = new Test();