diff --git a/1-js/06-advanced-functions/03-closure/lexenv-if.svg b/1-js/06-advanced-functions/03-closure/lexenv-if.svg index f7be2dcb..c6b16d4b 100644 --- a/1-js/06-advanced-functions/03-closure/lexenv-if.svg +++ b/1-js/06-advanced-functions/03-closure/lexenv-if.svg @@ -5,29 +5,57 @@ Created with sketchtool. - - - - - - - - - - - - - - - - - - - - - - - + + let + phrase + = + + "Hello" + ; + + + if + + ( + true + ) + + { + + + let + user + = + + "John" + ; + + + + alert + ( + ` + ${ + phrase + } + , + ${ + user + } + ` + ); + + } + + + alert + ( + user + ); + + // Error, no such variable! + + diff --git a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-4.svg b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-4.svg index 4be42ec6..0641ed4e 100644 --- a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-4.svg +++ b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-4.svg @@ -1,11 +1,11 @@ - + lexenv-nested-makecounter-4.svg Created with sketchtool. - + @@ -24,53 +24,52 @@ - + makeCounter: function - + - - counter: - function + + counter: function - + - + - + count: 0 - + outer - + outer - null + null - [[Environment]] + [[Environment]] - - + +