REPL or “Read Eval Print Loop” is a simple program that can accept commands, evaluate them, and prints the results. What REPL does is to create an environment that is similar to a Unix/Linux shell or a Window console, wherein you can enter command and system, and it will respond with the output. Here are the functions that REPL performs:
READ – This reads the input provided by the user, parses it into JavaScript data structure, and stores it in the memory.
EVAL – This executes the data structure.
PRINT – This prints the outcome generated after evaluating the command.
LOOP – This loops the above command until the user presses Ctrl+C twice.