[js]
let bien1 = 10;
let object1 = {
bien1: 2,
inra: function(){
console.log(this.bien1);
}
}
object1.inra(); //2
let copy = object1.inra; /
copy(); //10
// tương tự die() trong php
throw new Error("die()");
[/js]
Nguồn JS Land
code for fun or for food, that is the question
[js]
let bien1 = 10;
let object1 = {
bien1: 2,
inra: function(){
console.log(this.bien1);
}
}
object1.inra(); //2
let copy = object1.inra; /
copy(); //10
// tương tự die() trong php
throw new Error("die()");
[/js]
Nguồn JS Land