The “this” keyword can be tricky. Ania helps you sort out one of its quirks here.

Estimated read time 1 min read

Post Contenthttps://www.youtube.com/shorts/9UxVhurASxU

​ 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!   Read More freeCodeCamp.org 

#programming #freecodecamp #learn #learncode #learncoding

You May Also Like

More From Author