
📎 This article includes 2 downloadable practice files ↓
In this article
You already have JavaScript: every browser runs it. Press F12 in Chrome or Edge, open the Console tab and type 2 + 3. That’s a JavaScript program.
Node.js for scripts
Install Node.js (LTS) from nodejs.org. Save code in a file and run it from a terminal:
“`javascript
console.log(“Hello from JavaScript!”);
console.log(“2 + 3 =”, 2 + 3);
“`
“`text
node js-01-hello.js
“`
Where JavaScript runs
| Place | Used for |
|---|---|
| Browser | Interactive web pages |
| Node.js | Scripts, servers, tools |
| Excel Office Scripts | TypeScript, a typed JavaScript |
| Google Apps Script | Automating Sheets, Gmail, Drive |
💡 Use VS Code with the terminal open (Ctrl+`). Write, save, run with node file.js, repeat.
Practice
Run the script with Node and compare with the expected output.
📎 Practice files for this article
- 📄js-01-hello.jsLesson code file.⬇ JS · 134 B
- 📄js-01-hello-output.txtOutput from our test run.⬇ TXT · 51 B
Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.
✨ Ask AI about this article
Stuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong