Top 60+ Node.JS Interview Questions and answers

    1 Votes

31) What you mean by “process”?

“process” is a global object and will be used to represent a node process.
32) Explain exit codes in Node.JS? List out some exit codes?
Exit code will be used when the process needs to be ended with specified code. Below are the list of exit codes in Node.JS –
  • Fatal Error
  • Non-function Internal Exception Handler
  • Internal JavaScript Parse Error
  • Uncaught Fatal Exception
  • Unused
  • Internal JavaScript Evaluation Failure
  • Internal Exception Handler Run-Time Failure

 

33) List out the properties of process?
Below are the useful properties of process –
  • Platform
  • Stdin
  • Stdout
  • Stderr
  • execPath
  • mainModule
  • execArgv
  • config
  • arch
  • title
  • version
  • argv
  • env
  • exitCode

 

34) Define OS module?

OS module is used for some basic operating system related utility functions. Below is the syntax for importing OS module –

var MyopSystem = require("os")

35) What is the property of OS module?

os.EOL – Constant for defining appropriate end of line marker for OS.

36) Explain “Path” module in Node.JS?

“Path” module will be used for transforming and handling file paths. Below is the syntax of path module –

var mypath = require("path")

37) Explain “Net” module in Node.JS?

“Net” module is being used for creating both clients and servers. It will provide asynchronous network wrapper. Below is the syntax of Net module –

var mynet = require("net")

38) List out the differences between AngularJS and NodeJS?

AngularJS is a web application development framework. It’s a JavaScript and it is different from other web app frameworks written in JavaScript like jQuery. NodeJS is a runtime environment used for building server-side applications while AngularJS is a JavaScript framework mainly useful in building/developing client-side part of applications which run inside a web browser.

39) NodeJS is client side server side language?

NodeJS is a runtime system, which is used for creating server-side applications.

40) What are the advantages of NodeJS?

Below are the list of advantages of NodeJS –

  • Javascript – It’s a javascript which can be used on frontend and backend.
  • Community Driven - NodeJS has great open source community which has developed many excellent modules for NodeJS to add additional capabilities to NodeJS applications.

41) In which scenarios NodeJS works well?

NodeJS is not appropriate to use in scenarios where single-threaded calculations are going to be the holdup.

42) What you mean by JSON?

JavaScript Object Notation (JSON) is a practical, compound, widely popular data exchange format. This will enable JavaScript developers to quickly construct APIs.

43) Explain “Stub”?

Stub is a small program, which substitutes for a longer program, possibly to be loaded later and that is located remotely. Stubs are functions/programs that simulate the behaviors of components/modules.

44) List out all Node.JS versions available?

Below are the list of all NodsJS versions supported in operating systems –

OperatingSystemNode.js version
Windows node-v0.12.0-x64.msi
Linux node-v0.12.0-linux-x86.tar.gz
Mac node-v0.12.0-darwin-x86.tar.gz
SunOS node-v0.12.0-sunos-x86.tar.gz

45) Explain “Buffer class” in Node.JS?

It is a global class which can be accessed in an application without importing buffer modules.

46) How we can convert Buffer to JSON?

The syntax to convert Buffer to JSON is as shown beow

buffer.toJSON()
Page 3 of 4

Popular Videos

communication

How to improve your Interview, Salary Negotiation, Communication & Presentation Skills.

Got a tip or Question?
Let us know

Related Articles

HTML/HTML5 Interview Questions and Answers
JQuery Interview Questions and Answers
Javascript Interview Questions and Answers
Top AngularJS Questions and Answers
Top 70 CSS Interview Questions and Answers
React JS Interview Questions and Answers