const x = {
a: 1,
b: function() {
console.log(this);
}
}
x.b() /// {a: 1, b: ƒ}
const z = x.b // here this is window
z() // undefined
onst x = {
a: 1,
b: function() {
console.log(this);
}
}
x.b() /// {a: 1, b: ƒ}
const z = x.b // here this is window
z() // undefined