I can't access my object property with this ES6 expression :
const obj =
{
name: 'john',
test: () => console.log('hello'+this.name)
}
obj.test()
I only get "hello", and with this expression it works :
const obj =
{
name: 'john',
test: function() {
console.log('hello'+this.name)
}
}
What's happening here ?