How Does The 'This' Keyword Work in JavaScript? | JS Fundamentals

preview_player
Показать описание
In this video I discuss how the "this" keyword works in JavaScript and how the bind method an arrow functions may alter the default behavior. This is a pretty common JS interview question, so hopefully you find this useful and clear!

Рекомендации по теме
Комментарии
Автор

Great, I want to mention that the global variable name will be printed only if you are using var, the code will not print John if it declared using let.

waleedjubeh
Автор

Hi Chaim! Thank you for making these helpful js videos. You explain everything so clearly!

sophiagigliotti
Автор

Same code but i m getting undefined with const walk variable

niklausmikaelson
Автор

Nice job showing the abstract concepts in actual code!

nachmanfriedman
Автор

Hey Chaim, question here - Why in the arrow function the "this" is referring to the global object if it was declared inside the person object?

asafdulman
Автор

Great concepts to learn. Thank you, Chaim!

money
Автор

Nice job! This is really amazing! Where did you learn all this if I may ask?
Thank you :)

rachelray