1.

What is REPL in Context of Node?

Answer»

Node.js is an open source server-side JavaScript run-time condition based on Chrome's JavaScript Engine(V8). Node.js is utilized to structure quick and adaptable applications and is an occasion driven, non-blocking I/O model.  

REPL (READ, EVAL, PRINT, LOOP) is a PC situation like Shell (Unix/Linux) and direction brief. A command is entered and the system responds with an output. The hub accompanies the REPL condition when it is INTRODUCED, and the Framework ASSOCIATES with the client through yields of directions/articulations utilized. 

Node.js or Node comes bundled with a REPL environment that performs the following desired tasks. 

  • Read : It peruses the contributions from clients and parses it into JavaScript information structure. It is then put away to memory.  
  • Eval : The parsed JavaScript information structure is assessed for the outcomes.  
  • Print : The outcome is printed after the assessment.  
  • Loop : Loops the information order. To leave NODE REPL, press ctrl+c TWICE 

We have repl module which is available for standalone applicationsas well,  and can be called through below command:- 

const repl = require('repl'); 



Discussion

No Comment Found