Have been learning Javascript far past few months still here I end. :(
Got this below question in an interview:
var age = 10;
var obj = {
age: 54,
foo: () => {
console.log(this.age);
}
}
const { foo } = obj;
foo(); //10
What changes would be required to make it print "54" instead of "10"?
Will appreciate a lot if someone can suggest me some source where I can study the in-depth of javascript and its engine in detail but in laymen terms.