+ 3
Why this keyword return undefined and doesn't work for changing object value
Look at the JavaScript code https://code.sololearn.com/WAWsHd1S0Pmd/?ref=app
2 odpowiedzi
+ 4
"Arrow functions don't have their own bindings to this, arguments or super, and should not be used as methods."
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
You can also use a function expression
https://code.sololearn.com/WGzd87swM3Qw/?ref=app
0
Answer Here below