-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zh-CN: update Glossary/Sloppy_mode (#21548)
Co-authored-by: A1lo <[email protected]>
- Loading branch information
1 parent
ea2b672
commit 18ddebd
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
--- | ||
title: 正常模式 | ||
slug: Glossary/Sloppy_mode | ||
l10n: | ||
sourceCommit: ada5fa5ef15eadd44b549ecf906423b4a2092f34 | ||
--- | ||
|
||
{{GlossarySidebar}} | ||
|
||
因为翻译原因,正常模式也被翻译为——马虎模式/稀松模式/懒散模式 | ||
{{Glossary("ECMAScript")}} 5 及更高版本允许脚本选择进入新的[严格模式](/zh-CN/docs/Web/JavaScript/Reference/Strict_mode),其会以多种方式改变 JavaScript 的语义,以提高其弹性,并使在出现问题时更容易理解发生了什么。 | ||
|
||
{{Glossary("ECMAScript")}} 5 以及其后续的版本可以选择性的使用一种新模式——严格模式 ([strict mode](/zh-CN/docs/Web/JavaScript/Reference/Strict_mode)),这种严格模式在多个方面改变了 JavaScript 的语义,从而使得当出现问题时我们更好的理解到底发生了什么。 | ||
|
||
常见的,非严格模式——平时我们会称之为正常模式 (**sloppy mode),**这并不是一个官方说法,但是你会经常见到如上的一些说法,其意义就是指代非严格模式,即正常模式。 | ||
JavaScript 的正常、非严格模式有时被称为**正常模式**(sloppy mode)。这不是一个官方的称呼,但如果你花时间编写严格的 JavaScript 代码,你可能会遇到这个术语。 | ||
|
||
## 参见 | ||
|
||
- "[Strict Mode](http://speakingjs.com/es5/ch07.html#strict_mode)",第七章 ("JavaScript Syntax"),《Speaking _JavaScript》_ | ||
- [“严格模式”](http://speakingjs.com/es5/ch07.html#strict_mode),《Speaking _JavaScript_》的第七章(“JavaScript 语法”) |