From 715d5e728d5778a82e0b65aa18de64d60687ed48 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Wed, 31 Jul 2019 23:20:04 +0300 Subject: [PATCH] up --- .../03-closure/lexenv-if.svg | 74 +++++++++++++------ .../lexenv-nested-makecounter-4.svg | 31 ++++---- 2 files changed, 66 insertions(+), 39 deletions(-) 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]] - - + +