I’m actually new to programming and this community. Currently I’m working on a code that facing a scope issue with object literals. can anyone help me with this?
var obj = {
value: 3,
print:()=>console.log(value)
}
obj.print();
When we are using non arrow functions it is working. I can only use arrow functions here.