Skip to content

Commit c379149

Browse files
committed
Update Udemy_The_Complete_JavaScript_Course_2021.js
1 parent dba5a1e commit c379149

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Udemy_The_Complete_JavaScript_Course_2021.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3637,6 +3637,9 @@ const game = {
36373637
// And at this point the variable environment of IIFE is long gone. (so does the 'const header' variable)
36383638
// But still, each time when the page is clicked color of the h1 element changes randomly
36393639
// This works because of the closure
3640+
3641+
// Again, even though the environment in which this function here was created is already gone,
3642+
// it is still able to access the variables that were created in that variable by the time the function was born.
36403643

36413644
//#endregion
36423645

0 commit comments

Comments
 (0)