> For the complete documentation index, see [llms.txt](https://easonwang.gitbook.io/web_advance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://easonwang.gitbook.io/web_advance/chapter1/repl.md).

# REPL

讀取 Terminal 指令：

```javascript
const readline = require("readline");
const repl = readline.createInterface(process.stdin, process.stdout);
repl.on("line", (text) => {
  console.log(text);
});
```
