Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 0.1 — What JavaScript Is and Where It Runs
JavaScript · Example 1 of 3

JavaScript running in this page

The engine ran the JavaScript tab: it changed the paragraph and printed to the console.

JavaScript is the programming language of the web: an engine inside your browser (or inside Node.js on a server) reads your code and runs it, and the language itself is defined by a yearly standard called ECMAScript.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 5 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

In the second example, add a line that prints whether fetch exists, labelled fetch:. What does it print here, and what would old Node.js (before version 18) print?

02

Write two lines that print the ECMAScript edition that introduced let/const and the one that introduced async/await, each as a sentence.

Explain it without notes

01

What is a JavaScript engine, and can you name three?

02

What is the difference between the JavaScript language and the browser it runs in?

03

What is ECMAScript, and how are its versions named?

04

Why does a single syntax error stop a whole script, while a runtime error only stops it partway?

JavaScript running in this page

Preview

Press Run to see the page.

Console

Nothing logged yet.

Expected console output

Total: 120