Node.js is a platform built on the Chrome JavaScript runtime.

Node.js is an event-driven I/O server-side JavaScript environment based on Google's V8 engine. The V8 engine executes Javascript very quickly and has very good performance.

Node.js REPL (interactive interpreter) syntax

Node.js REPL (Read Eval Print Loop: interactive interpreter) represents a computer environment, similar to the terminal of the Window system or the Unix/Linux shell. We can enter commands in the terminal and receive the system's response.

Node comes with an interactive interpreter that can perform the following tasks:

Read - read user input, parse the input Javascript data structure and store it in memory.

Execution - Execute the input data structure

Print - Output the result

Loop - Loop the above steps until the user presses the ctrl-c button twice to exit.

Node’s interactive interpreter can debug Javascript code very well.

Node.js REPL (interactive interpreter) example

Simple expression operations

Next let’s perform simple mathematical operations in the command line window of Node.js REPL:

$ node
> 1 +4
5
> 5 / 2
2.5
> 3 * 6
18
> 4 - 1
3
> 1 + ( 2 * 3 ) - 4
3
>