JavaScript

Adding scripts to a web page

Comments

Statements

Variables

Booleans

Control structures

In the examples below, console.log is used to print messages to the JavaScript console. If you're running JavaScript in a web browser, the console can be found in your browser's developer tools. (See Firefox, Chrome, Edge, or Safari). If you're running Node.js, the console is usually your terminal.

Numbers

Strings

Functions

Arrays

Objects

Classes