Understand Javascript #1 | JS code execution | Higher order function | Callback function | Closure

preview_player
Показать описание
Hi there,

In this session, I cover the following concepts,
1. What is Javascript?
2. How a Javascript code executes?
3. Higher-order functions
4. Callback functions
5. Closure

Timestamps

00:00 stream starting
02:55 introduction
05:30 what is javascript?
11:33 more on js
13:00 execution of js code
34:45 QnA
35:56 DRY principle
38:00 Higher-order functions & callback
57:20 QnA
59:00 break
01:03:55 deduce the output 1
01:10:40 closure
01:29:40 deduce the output 2
01:31:50 IMPORTANT closure concept
01:35:07 deduce the output 3
01:44:02 QnA
01:51:30 stream ends
Рекомендации по теме
Комментарии
Автор

1:29 Summarizes that if counter value is not in it's local execution context, It searches if it's in closure before searching in parent execution context.
When parent function is removed from call stack, it sees if any child function dependent on it, if yes then it give reference access to child function of dependable data and only then parent function go away.
These reference access of parent data to child is called closure.
and need of closure is resuability, closure follows DRY principle. We kind of say closure under the hood is HOC with lexical environment.

Thus, that's how the closure remembers the variables of parent function even when parent function have been finished and no longer exist in call stack.

anjalii
Автор

Understood a lot of things. Thank you very well detailed explanation of all imp topics :)

lakshmijayarama
Автор

Hi Bhaiya, enjoyed the session. Learned many things.

anshumanxda