From 98be74f56a9f7c8715d6fb201c2726104ac2ba3d Mon Sep 17 00:00:00 2001 From: Lavrentiy Rubtsov Date: Tue, 17 May 2022 20:17:44 +0600 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9A=A1=20placed=20missed=20break=20line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1-js/02-first-steps/04-variables/article.md | 1 + 1 file changed, 1 insertion(+) diff --git a/1-js/02-first-steps/04-variables/article.md b/1-js/02-first-steps/04-variables/article.md index 7bce4b9c..be9930ae 100644 --- a/1-js/02-first-steps/04-variables/article.md +++ b/1-js/02-first-steps/04-variables/article.md @@ -64,6 +64,7 @@ let message = 'Hello'; ``` Some people also define multiple variables in this multiline style: + ```js no-beautify let user = 'John', age = 25, From 212c5275d413a416101edb4377de929d6dc84d73 Mon Sep 17 00:00:00 2001 From: Lavrentiy Rubtsov Date: Tue, 17 May 2022 20:24:34 +0600 Subject: [PATCH 2/3] =?UTF-8?q?=E2=9A=A1=20add=20missed=20break=20line=20a?= =?UTF-8?q?nd=20remove=20extra=20one?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1-js/02-first-steps/04-variables/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/04-variables/article.md b/1-js/02-first-steps/04-variables/article.md index be9930ae..55a06f0d 100644 --- a/1-js/02-first-steps/04-variables/article.md +++ b/1-js/02-first-steps/04-variables/article.md @@ -104,6 +104,7 @@ For instance, the variable `message` can be imagined as a box labeled `"message" We can put any value in the box. We can also change it as many times as we want: + ```js run let message; @@ -261,7 +262,6 @@ myBirthday = '01.01.2001'; // error, can't reassign the constant! When a programmer is sure that a variable will never change, they can declare it with `const` to guarantee and clearly communicate that fact to everyone. - ### Uppercase constants There is a widespread practice to use constants as aliases for difficult-to-remember values that are known prior to execution. From 98899d85466209f17fd40ebadeedf3dec1d43173 Mon Sep 17 00:00:00 2001 From: Lavrentiy Rubtsov Date: Tue, 17 May 2022 20:26:03 +0600 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9A=A1=20add=20missed=20one?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1-js/02-first-steps/04-variables/article.md | 1 + 1 file changed, 1 insertion(+) diff --git a/1-js/02-first-steps/04-variables/article.md b/1-js/02-first-steps/04-variables/article.md index 55a06f0d..4c2d09de 100644 --- a/1-js/02-first-steps/04-variables/article.md +++ b/1-js/02-first-steps/04-variables/article.md @@ -292,6 +292,7 @@ When should we use capitals for a constant and when should we name it normally? Being a "constant" just means that a variable's value never changes. But there are constants that are known prior to execution (like a hexadecimal value for red) and there are constants that are *calculated* in run-time, during the execution, but do not change after their initial assignment. For instance: + ```js const pageLoadTime = /* time taken by a webpage to load */; ```