JSFiddle - React, Tailwind, and code Playground

by Aaron Zhang

JavaScript

function Obj() {
    this.a = 1;
    var b = 2;
    this.c = function () {
        alert(this.a);
    };
    this.d = function () {
        (function () {
            console.log(this);
        })();
    };
}
Obj.prototype.e = function () {
    console.log(this.a);
};
var a = new Obj();
console.log(a.d());