The JavaScript Language Syntax
JavaScript·3 min read·Jan 1, 2025
Just like Bash, the JavaScript language has its own syntactic rules, which determine how it is interpreted and executed by the Node.js runtime environment.
Statements and execution order
In JavaScript, instructions called statements are composed of keywords, values, operators, expressions, and comments.
They include all the available JavaScript and Node.js builtins functions, but also additional structures, such as variables, conditions, and loops, that allow developers to create more complex logic and behavior by altering the standard execution flow of the script.
Within a script, statements are executed from top to bottom, one by one, in their order of declaration.
instruction_1;instruction_2;...Each statement is terminated by a semicolon character (;), which allows for multiple statements to occur on a single line or a single statement to span on multiple lines:
let a = 1;let b = 3; let c = 4;let d= 5;Case sensitivity
JavaScript is a case-sensitive language, which means that it distinguishes between uppercase and lowercase letters.
Unlock the Build CLI Apps in JavaScript & Node.js module
Learn how to build, integrate, and safeguard scalable CLI tools, scripts, and apps with JavaScript, Node.js, npm, and Git.
You get immediate access to:
- 45 focused lessons across JavaScript, Node.js, npm, and Git
- 17 real-world projects with commented solutions
- Ongoing updates to this bundle
- Lifetime access to this bundle