Just diving into the world of programming and joining this community for the first time. I'm currently grappling with a scope issue involving object literals in my code. Any assistance would be greatly appreciated!
var obj = {
value: 3,
print:()=>console.log(value)
}
obj.print();
I've noticed that it works fine when using non-arrow functions, but unfortunately I am restricted to using arrow functions in this scenario.