From 2cf5ef7168ca5da8ebf33bb211a6aaaaf57ea243 Mon Sep 17 00:00:00 2001 From: Aurelian Date: Tue, 20 Dec 2022 22:02:55 +0200 Subject: [PATCH] we are suggesting some changes, after translating into Romanian --- 1-js/02-first-steps/03-strict-mode/article.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/1-js/02-first-steps/03-strict-mode/article.md b/1-js/02-first-steps/03-strict-mode/article.md index 9586733cc8..f1d6453857 100644 --- a/1-js/02-first-steps/03-strict-mode/article.md +++ b/1-js/02-first-steps/03-strict-mode/article.md @@ -1,6 +1,6 @@ # The modern mode, "use strict" -For a long time, JavaScript evolved without compatibility issues. New features were added to the language while old functionality didn't change. +For a long time, JavaScript evolved without compatibility issues. New features were added to the language, while old functionality didn't change. That had the benefit of never breaking existing code. But the downside was that any mistake or an imperfect decision made by JavaScript's creators got stuck in the language forever. @@ -19,7 +19,7 @@ For example: ... ``` -Quite soon we're going to learn functions (a way to group commands), so let's note in advance that `"use strict"` can be put at the beginning of a function. Doing that enables strict mode in that function only. But usually people use it for the whole script. +Quite soon we're going to learn functions (a way to group commands), so let's note in advance that `"use strict"` can be put at the beginning of a function. Doing that enables strict mode in that function only. But usually programmers use it for the whole script. ````warn header="Ensure that \"use strict\" is at the top" Please make sure that `"use strict"` is at the top of your scripts, otherwise strict mode may not be enabled. @@ -39,7 +39,7 @@ Only comments may appear above `"use strict"`. ```` ```warn header="There's no way to cancel `use strict`" -There is no directive like `"no use strict"` that reverts the engine to old behavior. +There is no directive like `"no use strict"` that reverts the JavaScript engine to old behavior. Once we enter strict mode, there's no going back. ``` @@ -80,10 +80,10 @@ One could recommend to start scripts with `"use strict"`... But you know what's Modern JavaScript supports "classes" and "modules" - advanced language structures (we'll surely get to them), that enable `use strict` automatically. So we don't need to add the `"use strict"` directive, if we use them. -**So, for now `"use strict";` is a welcome guest at the top of your scripts. Later, when your code is all in classes and modules, you may omit it.** +**So, for now `"use strict";` is a good literal expression at the top of your scripts. Later, when your code is all in classes and modules, you may omit it.** As of now, we've got to know about `use strict` in general. In the next chapters, as we learn language features, we'll see the differences between the strict and old modes. Luckily, there aren't many and they actually make our lives better. -All examples in this tutorial assume strict mode unless (very rarely) specified otherwise. +All examples in this tutorial assume strict mode, unless (very rarely) specified otherwise.