# Running Scripts & the REPL — Node.js Fundamentals: Modules, Async and Servers

Source: https://www.skillbyai.com/en/nodejs/node-running-repl

> Run JavaScript files with node and experiment interactively in the Node REPL.

## Running a file

Save as `hello.js`, then run `node hello.js` in your terminal.

```javascript
console.log("Hello from Node!");
```

Output:

```
Hello from Node!
```

## The REPL

Running `node` with no file drops you into the **REPL** — a Read-Eval-Print Loop for quick experiments.

```bash
$ node
> 2 + 2
4
> const x = 10
undefined
> x * 2
20
> .exit
```

**Quiz:** What does REPL stand for?

- [ ] Run-Execute-Process Line
- [ ] Remote Execution Protocol Layer
- [ ] Rapid Event Preview Loop
- [x] Read-Eval-Print Loop

*Answer:* Read-Eval-Print Loop. It reads your input, evaluates it, prints the result, and loops.
