JavaScript Interview Tip ⚡
#javascriptinterview #thiskeyword #webdevelopment
JavaScript Interview Tip ⚡
Why does this.name become undefined inside setTimeout?
Because normal functions lose the object context.
Fix it using arrow functions — they use lexical this.
Save this for interviews & avoid common this bugs in React and JS.
#JavaScriptInterview #ThisKeyword #WebDevelopment #FrontendDeveloper #MohitDecodes
Comments
Comments from the original post on Instagram
No comments yet
