JSFiddle - React, Tailwind, and code Playground
by Viet27th
JavaScript
let a = function() {
this.var1 = 1;
this.b = function() {
this.var2= 2;
this.c = function() {
this.var3 = 3;
let d = () => {
console.log(this);
}
console.log("Đây là Scope của function c:", this);
d();
}
console.log("Đây là Scope của function b:", this);
this.c();
}
console.log("Đây là Scope của function a:" , this);
this.b();
}
new a();