Arrow functions don't have their own 'this'! They inherit it from the parent scope. So obj.name is undefined here. Use regular functions when you need 'this' to refer to the object!
|
What are recent advances in the field of...
Today Quincy Larson interviews Kunal Kus...
Arrow functions don't have their own 'th...
Learn Git and GitHub from scratch with c...
freeCodeCamp runs right in the browser -...
This is part two of our two episode seri...
See how Gemini 3 writes code and builds ...
Download your free Python Cheat Sheet he...
Welcome to the full course on becoming a...