Here is my code:
'use strict';
let obj = {
username : 'Hans Gruber',
hello: () => 'hello, ' + this.username
};
console.log(obj.hello());
But the output is: hello, undefined
.
I expect the output to be: hello, Hans Gruber
.
I think I have not understood this
in an arrow function. Who can give me a clear explanation?