minor fixes

This commit is contained in:
Ilya Kantor 2019-07-26 23:21:49 +03:00
parent 689975093c
commit f6ff773033
24 changed files with 67 additions and 76 deletions

View file

@ -4,7 +4,7 @@ For a long time, JavaScript evolved without compatibility issues. New features w
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.
This was the case until 2009 when ECMAScript 5 (ES5) appeared. It added new features to the language and modified some of the existing ones. To keep the old code working, most modifications are off by default. You need to explicitly enable them with a special directive: `"use strict"`.
This was the case until 2009 when ECMAScript 5 (ES5) appeared. It added new features to the language and modified some of the existing ones. To keep the old code working, most such modifications are off by default. You need to explicitly enable them with a special directive: `"use strict"`.
## "use strict"
@ -19,9 +19,7 @@ For example:
...
```
We will learn functions (a way to group commands) soon.
Looking ahead, let's just note that `"use strict"` can be put at the start of most kinds of functions instead of the whole script. Doing that enables strict mode in that function only. But usually, people use it for the whole script.
We will learn functions (a way to group commands) soon. Looking ahead, let's note that `"use strict"` can be put at the start of most kinds of functions instead of the whole script. Doing that enables strict mode in that function only. But usually, people use it for the whole script.
````warn header="Ensure that \"use strict\" is at the top"