Node js Interview Questions
Preparing for a Node Js Interview? Here are a list fo 60+ Interview questions that can help you prepare better.
- What is Node.js? Where can you use it?
- How else can the JavaScript code below be written using Node.Js to produce the same output?
- How do you update NPM to a new version in Node.js?
- Why is Node.js Single-threaded?
- How do you prevent/fix callback hell?
- Explain the role of REPL in Node.js.
- Name the types of API functions in Node.js.
- Which is the first argument typically passed to a Node.js callback handler?
- What are the functionalities of NPM in Node.js?
- What is the difference between Node.js and Ajax?
- Explain chaining in Node.js.
- What are “streams” in Node.js? Explain the different types of streams present in Node.js.
- What are exit codes in Node.js? List some exit codes.
- What are Globals in Node.js?
- What is the difference between AngularJS and Node.js?
- Why is consistent style important and what tools can be used to assure it?
- What are the timing features of Node.js?
- What is LTS releases of Node.js why should you care?
- Why should you separate Express ‘app’ and ‘server’?
- What is the difference between process.nextTick() and setImmediate() ?
- What is global installation of dependencies?
- If Node.js is single threaded then how it handles concurrency?
- How can you avoid callback hells?
- What’s the event loop?
- How Node prevents blocking code?
- What is Event Emmitter?
- What tools can be used to assure consistent code style?
- Provide some example of config file separation for dev and prod environments
- Explain usage of NODE_ENV
- Explain what is Reactor Pattern in Node.js?
- What is the relation of Node.js with JavaScript?
- Explain the term I/O in the context of Node.js.
- Which are the two types of API functions in Node.js
- List the tools and IDEs that are used for Node.js.
- Explain the role of the Callback function in Node.js.
- In the context of Node.js, differentiate between operational and programmer errors.
- Which is the framework that is most commonly used in Node.js?
- What are the two sections of event-driven programming?
- Explain the Control Flow function.
- List the steps involved in the Control Flow function.
- Can a user access DOM in a Node?
- In Node.js, how do you access the last expression?
- In Node.js, which command is used to import external libraries?
- What is the biggest drawback of Node.js?
- What is a Promise?
- What are ACID properties wrt to a database?
- Where and why should you not use NodeJS?
- Explain event loop
- What is stream and explain types of streams
- Explain child processes in Node
- Can we send/receive messages between child processes
- Explain file system module of Node
- How to scale Node application
- List down your favorite and most useful NPM library
- How to deploy Node application
- How to create classes and perform inheritance.
- What is an error-first callback?
- When should you npm and when yarn?
- What’s a test pyramid? Give an example!
- What’s your favorite HTTP framework and why?
- How can you secure your HTTP cookies against XSS attacks?
- How can you make sure your dependencies are safe?
- How can you listen on port 80 with Node?
- What’s the difference between operational and programmer errors?
- Why npm shrinkwrap is useful?
- What’s a stub? Name a use case.
- How can you implement it when talking about HTTP APIs?