Grammar/usage/punctuation edits, Part 1, sections 2.1 - 2.8
This commit is contained in:
parent
c6271b5c58
commit
568aea1e27
8 changed files with 64 additions and 64 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
For a long time JavaScript was evolving without compatibility issues. New features were added to the language, but the old functionality did not change.
|
||||
|
||||
That had the benefit of never breaking the existing codes. But the downside was that any mistake or an imperfect decision made by JavaScript creators got stuck in the language forever.
|
||||
That had the benefit of never breaking existing code. But the downside was that any mistake or an imperfect decision made by JavaScript creators got stuck in the language forever.
|
||||
|
||||
It had been so 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. One needs to enable them explicitly with a special directive `"use strict"`.
|
||||
|
||||
|
@ -55,7 +55,7 @@ The differences of `"use strict"` versus the "default" mode are still to be cove
|
|||
|
||||
In the next chapters, as we learn language features, we'll make notes about the differences of the strict mode. Luckily, there are not so many. And they actually make our life better.
|
||||
|
||||
At this point of time it's enough to know about it in general:
|
||||
At this point in time it's enough to know about it in general:
|
||||
|
||||
1. The `"use strict"` directive switches the engine to the "modern" mode, changing the behavior of some built-in features. We'll see the details as we study.
|
||||
2. The strict mode is enabled by `"use strict"` at the top. Also there are several language features like "classes" and "modules" that enable strict mode automatically.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue