The Read-Evaluate-Print-Loop (REPL) is the interactive Node.js shell.

It is a simple JavaScript editor.

Opening Shell
  • Open a console window.
  • Type command node
c:\work\nodejs\play>node
Shell
We are now in the REPL shell.

Do some js!
> 5 + 5
10
> 'Hello' + ' ' + 'World'
'Hello World'
Variables
Variables are allowed
> const array = [5, 2, 3, 1, 4]
> array.sort()
[ 1, 2, 3, 4, 5 ]


References