Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!

Syntax specifies the required combination and sequence of characters making up correctly structured code. Syntax varies from language to language (e.g., syntax is different in HTML and JavaScript). Syntax applies both to programming languages (commands to the computer) and markup languages (document structure information).

Syntax only governs ordering and structure; the instructions must also be meaningful, which is the province of semantics.

Code must have correct syntax in order to compile correctly, otherwise a syntax error occurs. Even small errors, like a missing parenthesis, can keep source code from compiling.

Frameworks are said to have a "clean" syntax if they produce simple, readable, concise results. If a codebase uses "a lot of syntax", it requires more characters to achieve the same functionality.

Learn more

General knowledge

文档标签和贡献者

 此页面的贡献者: hbloomer, sap, Andrew_Pfeiffer, Sheppy, alispivak, klez, kscarfone, panaggio
 最后编辑者: hbloomer,