JavaScript syntax
set of rules that define a JavaScript program

The syntax of JavaScript is the set of rules that define a correctly structured JavaScript program.
The examples below make use of the console.log() function present in most browsers for standard text output.
The JavaScript standard library lacks an official standard text output function (with the exception of document.write). Given that JavaScript is mainly used for client-side scripting within modern web browsers, and that almost all web browsers provide the alert function, alert can also be used, but it is not commonly used.
TypeScript, which extends JavaScript with type annotations and additional features, has the same syntax as well as its own additional features.
Origins
Brendan Eich summarized the ancestry of the syntax in the first paragraph of the JavaScript 1.1 specification as follows:
JavaScript borrows most of its syntax from Java, but also inherits from Awk and Perl, with some indirect influence from Self in its object prototype system.
JavaScript syntax is mostly derived from Java syntax, which in turn is derived from C syntax and C++ syntax.
Basics
Keywords
Reserved keywords
The following words are keywords.
Reserved keywords in strict mode
The following words are keywords in strict mode.
Reserved keywords in module code or async function body
The following words are keywords in module code or async function body
Literal values
The following words refer to literal values used by the language.
The public source identifies “JavaScript syntax” as set of rules that define a JavaScript program. This brief keeps that definition visible, then builds a research path around JavaScript, syntax and rules.
Why this record matters
A short description can identify a subject without explaining its stakes. For “JavaScript syntax”, the useful work is to connect “set of rules that define a JavaScript program” to the records capable of establishing context and consequence.
Vocabulary and entity names are the principal evidence signals here, because they determine the precision of every later search. The source revision retrieved here is dated Sep 6, 2026. The linked authority identifier is Q1024422. None of the 0 selected statements returned an explicit reference.
The absence of detail may reflect summary conventions rather than a lack of surviving documentation. The lead is largely declarative, so disagreement and counter-evidence require a deliberate search beyond the opening account. Authority statements aid reconciliation but still require their own references, qualifiers and ranks to be checked.
How to read it
Use the entry as an orientation point, then follow its citations and revision history. Names, dates and institutional relationships should be checked against the original record.
- Subject orientation
- Search vocabulary
- Locating named sources
The closest primary source, responsible institution and strongest cited specialist reference.
Three-step research path
- Establish the record: confirm the title “JavaScript syntax”, its source revision and the description used here.
- Expand the search: follow JavaScript syntax primary sources, JavaScript syntax archive and JavaScript research across catalogues and specialist indexes.
- Test the account: compare the strongest cited source with the responsible institution’s current record and note any disagreement.
Questions for further research
- Which source most directly establishes the central claim about “JavaScript syntax”?
- Which institution is responsible for the underlying evidence?
- What terminology or title could unlock a more precise catalogue search?
Search terms from this dossier
This entry incorporates text from “JavaScript syntax” on English Wikipedia. Contributors are listed in the page history. Text is available under the Creative Commons Attribution-ShareAlike 4.0 License. Selected authority identifiers and statements are retrieved from Wikidata under CC0; their references and qualifiers remain part of the verification path.