Download Node.js. Run as node. Ctrl-C (twice) to quit.

On Ubuntu I had to install the nodejs package and the command is called nodejs as there was already command called node.

On Mac first install Homebrew and then brew install node.

Maybe you'll need to use the Git bash shell...

> .help
> .exit

> .break

Some JavaScript using the Node.js REPL

Variables and numbers

> a = 23
> b = 19
> a+b

The behaviour of + depends on the operands. If even one of them is a sting, + will concatenate them as string. Use parseInt() to convert a string to an integer.

> c = "1"
> a+c
> a+parseInt(c)