Interview :: Node.js
Yes, Node.js provides a simple TCP based protocol and built-in debugging client. For debugging your JavaScript file, you can use debug argument followed by the js file name you want to debug.
Syntax:
Control flow function is a generic piece of code that runs in between several asynchronous function calls.
The control flow does the following job:
- Control the order of execution
- Collect data
- Limit concurrency
- Call the next step in a program
No, it is not possible to access DOM in Node.
- I/O operations
- Heavy computation
- Anything requiring blocking
REPL stands for Read Eval Print Loop. It specifies a computer environment like a window console or Unix/Linux shell where you can enter a command, and the computer responds with an output.
REPL environment incorporates with Node.js.
Following are the terms used in REPL with their defined tasks:
Read: It reads user's input; parse the input into JavaScript data-structure and stores in memory.
Eval: It takes and evaluates the data structure.
Print: It is used to print the result.
Loop: It loops the above command until user press ctrl-c twice to terminate.
Yes. You can evaluate simple expressions using Node REPL.
In REPL, the underscore variable is used to get the last result.
Yes, Node.js Crypto module supports cryptography. It provides cryptographic functionality that includes a set of wrappers for open SSL's hash HMAC, cipher, decipher, sign and verify functions. For example: