NODE JS
INTERVIEW
QUESTION
070709 05090
070709 05090 https://tutorials.ducatindia.com
https://tutorials.ducatindia.com
Q1). Explain Node
JS?


Node JS is open source
platform or cross-platform
which runs as back-end
JavaScript runtime
environment on chrome (V8
engine).
It supports following OS, Z/OS,
Linux, macOS, Microsoft
Windows, open BSD, SmartOS.
Q2). Features of Node
JS?




Main features of Node JS is Productivity, Fast,
Real-Time Application, asynchronous and
Streaming in Node JS.
PRODUCTIVITY
FAST
ASYNCHRONOUS
REAL TIME APPLICATION
STREAMING
Q3). Who developed
Node JS and how to
use REPL in Node
JS?




Node JS was developed in 2009 by
Ryan Dahl.
First if you want to know the version of
node js then write following command as-
“Node –v”. REPL means Read Evaluate Print
Loop. When you type something in prompt
and click to execute then REPL Process the
prompt and give output in prompt. REPL
read the prompt, evaluate it and then print
the result and show the prompt with
specific loop.
Q4). REPL commands in
Node JS?


Ctrl+c = For terminating current
command
Ctrl+c twice = for terminating REPL.
Ctrl+d- for terminating REPL
Tab keys – list of all current
commands.
Break – exit from multiline
expression.
Save with filename – save REPL
session to a file.
Below are some REPL main commands:
Q5). Explain NPM in
Node JS?




NPM is three different things; stand for
node package manager, its Idea about
managing the packages. Let’s suppose
the third party library like lodash. Lodash
is very good library having amazing
manipulation feature used for JavaScript.
Usually what developer does, developer
go to library and download the source
and save to the project. So, JavaScript
has its own package manager or library
for the convenience. So, NPM has
following features-:
Q6). Explain callback in
Node.JS and how it can
be more scalable?




Callback is called when
asynchronous operation has
been completed. Callbacks are
heavily use by Node.js and all
API’S OF Node.js is written to
support callbacks.
Q7). How it can be more
scalable?
Node.js works well for input output
bound but not CPU bound work. For
instance, to read a file if there is a
function then file reading will be started
during that instruction and once input
output is done, callback function is
called.
So, no blocking will be there with
callbacks.
Q8). Explain global
and local of
dependencies of
Node.js




Globally installed packages are
stored in < user-directory>/npm
directory and these dependencies
used in CLI (command line
interface) of any node.js.
NPM will install the dependencies in
local mode by default. Local mode
refers to package installation in
node_modules directory lying in the
folder where node application is
present.
1.
2.
Q9). Explain child process
module and why to use exec,
fork, spawn() method for child
process module?




To create child process module
you have following three ways-:
Spawn: It launches new process with
command child.process
Exec: child_process_exec method
runs command in shell/console and
buffers the output.
Fork:It is special case of spawn to
create child processes command as
child_process
Q10) Explain
Stream Pipe
method in Node.js ?




Stream method denoted as
stream.pipe(), this method used for
taking readable stream and connect it
to writeable stream. Streams in node.js
used to handle asynchronous process.
It also helps in buffer data, it collects
the data as it comes in until you are
ready to use it or until all the data has
arrived from stream.
Thank You!

Top 10 Most Important Interview Question of Node JS.

  • 1.
    NODE JS INTERVIEW QUESTION 070709 05090 07070905090 https://tutorials.ducatindia.com https://tutorials.ducatindia.com
  • 2.
    Q1). Explain Node JS? NodeJS is open source platform or cross-platform which runs as back-end JavaScript runtime environment on chrome (V8 engine). It supports following OS, Z/OS, Linux, macOS, Microsoft Windows, open BSD, SmartOS.
  • 3.
    Q2). Features ofNode JS? Main features of Node JS is Productivity, Fast, Real-Time Application, asynchronous and Streaming in Node JS. PRODUCTIVITY FAST ASYNCHRONOUS REAL TIME APPLICATION STREAMING
  • 4.
    Q3). Who developed NodeJS and how to use REPL in Node JS? Node JS was developed in 2009 by Ryan Dahl. First if you want to know the version of node js then write following command as- “Node –v”. REPL means Read Evaluate Print Loop. When you type something in prompt and click to execute then REPL Process the prompt and give output in prompt. REPL read the prompt, evaluate it and then print the result and show the prompt with specific loop.
  • 5.
    Q4). REPL commandsin Node JS? Ctrl+c = For terminating current command Ctrl+c twice = for terminating REPL. Ctrl+d- for terminating REPL Tab keys – list of all current commands. Break – exit from multiline expression. Save with filename – save REPL session to a file. Below are some REPL main commands:
  • 6.
    Q5). Explain NPMin Node JS? NPM is three different things; stand for node package manager, its Idea about managing the packages. Let’s suppose the third party library like lodash. Lodash is very good library having amazing manipulation feature used for JavaScript. Usually what developer does, developer go to library and download the source and save to the project. So, JavaScript has its own package manager or library for the convenience. So, NPM has following features-:
  • 7.
    Q6). Explain callbackin Node.JS and how it can be more scalable? Callback is called when asynchronous operation has been completed. Callbacks are heavily use by Node.js and all API’S OF Node.js is written to support callbacks.
  • 8.
    Q7). How itcan be more scalable? Node.js works well for input output bound but not CPU bound work. For instance, to read a file if there is a function then file reading will be started during that instruction and once input output is done, callback function is called. So, no blocking will be there with callbacks.
  • 9.
    Q8). Explain global andlocal of dependencies of Node.js Globally installed packages are stored in < user-directory>/npm directory and these dependencies used in CLI (command line interface) of any node.js. NPM will install the dependencies in local mode by default. Local mode refers to package installation in node_modules directory lying in the folder where node application is present. 1. 2.
  • 10.
    Q9). Explain childprocess module and why to use exec, fork, spawn() method for child process module? To create child process module you have following three ways-: Spawn: It launches new process with command child.process Exec: child_process_exec method runs command in shell/console and buffers the output. Fork:It is special case of spawn to create child processes command as child_process
  • 11.
    Q10) Explain Stream Pipe methodin Node.js ? Stream method denoted as stream.pipe(), this method used for taking readable stream and connect it to writeable stream. Streams in node.js used to handle asynchronous process. It also helps in buffer data, it collects the data as it comes in until you are ready to use it or until all the data has arrived from stream.
  • 12.