var std_obj = {
activeEffect : 'fade',
name : 'Jane',
displayMe() {
const doSomeEffects = () => {
if (this.activeEffect === 'fade') {
console.log(this.name); // this.name have accesss and logs
// return this.name --> gives undefined ? why can't I return?
}
};
doSomeEffects();
}
};
console.log(std_obj.displayMe());
// console.log(this.name) works but I cannot return this.name and I'm a bit frustrated