Let us suppose we have an object profile with properties name and getName method (arrow function).
profile = {
    name: 'abcd',
    getName: () => {
        console.log(this.name);
    }
}
I want to call getName method by keeping the arrow function intact, and not changing it to regular function.
How can I get the output abcd by calling getName().
You can add expressions inside getName.
Will call() or bind() help? If so, how?
DO NOT CHANGE THE ARROW FUNCTION TO REGULAR FUNCTION
-- EDITED --
I just want to ask how can we use arrow functions inside objects so that it reflect the results as we will get in regular functions.
It was just an interview question.
 
    