What is npm? What is the main functionality of npm?

npm stands for Node Package Manager. Following are the two main functionalities of npm: Online repositories for node.js packages/modules which are searchable on search.nodejs.org Command line utility to install packages, do version management and dependency management of Node.js packages. For a Node.js interview, the correct answer to the question “What is npm? What is the … Read more

Does Node.js supports cryptography?

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. Yes, Node.js supports cryptography through its built-in crypto module. This module provides cryptographic functionality that includes a set of wrappers for OpenSSL’s hash, HMAC, cipher, decipher, sign, and … Read more

What is the use of the underscore variable in REPL?

In REPL, the underscore variable is used to get the last result. In Node.js REPL (Read-Eval-Print Loop), the underscore variable (_) serves as a reference to the result of the last operation. It allows users to conveniently access the result of the previous expression or operation without explicitly storing it in a variable. For example: … Read more

Is it possible to evaluate simple expressions using Node REPL?

Yes. You can evaluate simple expressions using Node REPL. Yes, it is possible to evaluate simple expressions using the Node.js REPL (Read-Eval-Print Loop). REPL stands for Read-Eval-Print Loop, and it allows you to interactively run JavaScript code. You can evaluate expressions, declare variables, define functions, and execute JavaScript statements directly in the Node.js REPL environment. … Read more

Explain the tasks of terms used in Node REPL

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. … Read more