From aabdb76c0eea0ed0f745d21e40560a9fd34f2e85 Mon Sep 17 00:00:00 2001 From: Kirill <79372250+bybbsy@users.noreply.github.com> Date: Wed, 20 Dec 2023 12:40:34 +0300 Subject: [PATCH] What's node.js description fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 63a6af9..a8b22d6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ 95 Node.js interview questions here 👉 https://devinterview.io/dev/nodejs-interview-questions -



🔹 1. What is npm?

Answer:

npm stands for Node Package Manager. npm provides following two main functionalities:

  • 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.
Source: tutorialspoint.com   


🔹 2. What is Node.js?

Answer:

Node.js is a web application framework built on Google Chrome's JavaScript Engine (V8 Engine).

Node.js comes with runtime environment on which a Javascript based script can be interpreted and executed (It is analogus to JVM to JAVA byte code). This runtime allows to execute a JavaScript code on any machine outside a browser. Because of this runtime of Node.js, JavaScript is now can be executed on server as well.

Node.js = Runtime Environment + JavaScript Library

Source: tutorialspoint.com   


🔹 3. What are the two types of API functions in Node.js?

Answer:

The two types of API functions in Node.js are: a) Asynchronous, non-blocking functions b) Synchronous, blocking functions

Source: lazyquestion.com   


🔹 4. What is an error-first callback?

Answer:

Error-first callbacks are used to pass errors and data. The first argument is always an error object that the programmer has to check if something went wrong. Additional arguments are used to pass data.

fs.readFile(filePath, function(err, data) {
+    



🔹 1. What is npm?

Answer:

npm stands for Node Package Manager. npm provides following two main functionalities:

  • 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.
Source: tutorialspoint.com   


🔹 2. What is Node.js?

Answer:

Node.js is an asynchronous event-driven JavaScript runtime, that allows you to run your JavaScript code outside web browser.

Node.js uses V8 engine to parse and execute JavaScript code under the hood. V8 is written in C++ which makes Node.js very fast.

It's a platform independed runtime. You can install it on Windows, Linux or MacOS.

Node.js is neither a framework nor a library

Source: nodejs.org   


🔹 3. What are the two types of API functions in Node.js?

Answer:

The two types of API functions in Node.js are: a) Asynchronous, non-blocking functions b) Synchronous, blocking functions

Source: lazyquestion.com   


🔹 4. What is an error-first callback?

Answer:

Error-first callbacks are used to pass errors and data. The first argument is always an error object that the programmer has to check if something went wrong. Additional arguments are used to pass data.

fs.readFile(filePath, function(err, data) {
   if (err) {
     //handle the error
   }