Predict the output - episode 2 - Javascript

Publicado em: 30 Dezembro 2022
no canal de: Code on Mars
56
0

Output
"undefined"

Reason
It's important to have prior knowledge of how "this" works in javascript.
As we have called data.getName(), so "this" inside the arrow function "getName" will refer to the window object (from the parent scope). Hence the output is undefined.

📖 Suggested books
Introduction to Algorithms - https://amzn.to/3IdqpHu
Data Structures And Algorithms Made Easy: Data Structures - https://amzn.to/3vuqVJE
SPEAKING JAVASCRIPT AN IN-DEPTH GUIDE FOR PROGRAMMERS - https://amzn.to/3i149FU
Cracking the Coding Interview - https://amzn.to/3jJnzjm
DESIGNING DATA-INTENSIVE APPLICATIONS - https://amzn.to/3GqD4Wa
Atomic Habits: The life-changing million-copy bestseller - https://amzn.to/3IcETHm
System Design Interview - An insider's guide - https://amzn.to/3jDZtqa
DEEP WORK: RULES FOR FOCUSED SUCCESS IN A DISTRACTED WORLD - https://amzn.to/3GrumHg

Better way to prepare for Frontend interviews - https://preparefrontend.com


Nesta página do site você pode assistir ao vídeo on-line Predict the output - episode 2 - Javascript duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Code on Mars 30 Dezembro 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 56 vezes e gostou 0 espectadores. Boa visualização!