Showing wrong out put
Javed Mujawar
this is my code
let status = "๐";
setTimeout(() => {
const status = "๐";
const data = {
status: "๐",
getStatus() {
return this.status;
},
};
console.log(data.getStatus());
console.log(data.getStatus.call(this));
}, 0);
expected output
๐
๐
But getting
๐
undefined