Log inJoin
4 / 11 · Book 12 · Your First Program← prev⊞ allnext →Get the book →

1.4The REPL

A REPL (Read-Eval-Print Loop) lets you type code interactively and see results immediately. Use it to experiment.

# Python REPL
python
>>> 2 + 2
4
>>> "test" + "_login"
'test_login'
>>> exit()
# Node.js REPL (works for both JS and quick TS experiments)
node
> 2 + 2
4
> "test" + "_login"
'test_login'
> .exit

TypeScript does not ship a built-in REPL, but npx tsx can run .ts files instantly. For interactive exploration, use the Node REPL and add types when you move code into a .ts file.