Getting started
This part of the JavaScript course puts a Node.js runtime on the machine and takes a first program through it: the packages on Linux, macOS and Windows, the editor and the REPL, the first file run with node, and the output, the comments and the semicolon rule that shapes it. Variables and the eight types follow, with typeof and the safe integer range, then the operators and the two equality signs, the conditions and the loops. The part ends with functions: a declaration, an arrow, defaults, a rest parameter and a call that returns undefined.
001
What JavaScript is and where it runs
the language, the browser against Node.js, the event loop in one paragraph, a first program and a fragment for the browser
Open
002
Install Node.js on Linux, macOS and Windows
the package per system, the LTS line, node --version and npm --version, the versions a program reads from process.versions
Open
003
The editor, the Node REPL and running a file
the edit-run loop, a REPL session, node file.js, process.argv and __filename
Open
004
Your first JavaScript program
hello.js line by line, template literals, the exit status set with process.exitCode
Open
005
Output, comments and the semicolon rule
stdout against stderr, what console.log prints, the two comment forms, automatic semicolon insertion
Open
006
Variables: const, let, var
const and frozen objects, let and block scope, var and hoisting, the temporal dead zone
Open
007
Types: number, string, boolean and the rest
typeof for the eight types, the safe integer range, bigint, strings and conversion, null against undefined, symbols
Open
008
Operators and equality
arithmetic and precedence, the plus sign with text, comparison, === against ==, Object.is, || && and ??
Open
009
Conditions and loops
if and else, the conditional operator, switch and fallthrough, for, while and for...of, break, continue and labels
Open
010
Functions: declaration, arrow, return values
declaration hoisting, arrow functions, default and rest parameters, a call that returns undefined, a function expression in the dead zone
Open