Interview NodeJS Questions for all level

Entry

Q1: What is Node.js?
Q2: What is npm?
Q3: What are the two types of API functions in Node.js?

Junior

Q4: What do you mean by Asynchronous API?
Q5: What are the benefits of using Node.js?
Q6: Is Node a single threaded application?
Q7: What is global installation of dependencies?
Q8: What is an error-first callback?
Q9: What’s the difference between operational and programmer errors?
Q10: What is the difference between Nodejs, AJAX, and jQuery?
Q11: How to make Post request in Node.js?
Q12: How you can monitor a file for modifications in Node.js ?
Q13: What is control flow function?
Q14: What are Event Listeners?
Q15: If Node.js is single threaded then how it handles concurrency?
Q16: What is Callback Hell?
Q17: List out the differences between AngularJS and NodeJS?
Q18: Could we run an external process with Node.js?
Q19: What are the core modules of Node.js?
Q20: What is V8?
Q21: What is libuv?
Q22: What is the difference between returning a callback and just calling a callback?
Q23: What are the key features of Node.js?

Mid

Q24: What is REPL in context of Node?
Q25: What is Callback?
Q26: How Node prevents blocking code?
Q27: What is Event Loop?
Q28: What is Event Emmitter?
Q29: What is purpose of Buffer class in Node?
Q30: What is difference between synchronous and asynchronous method of fs module?
Q31: What are streams?
Q32: What is Chaining in Node?
Q33: What is the purpose of setTimeout function?
Q34: How can you avoid callback hells?
Q35: How to avoid callback hell in Node.js?
Q36: Explain how does Node.js work?
Q37: When should we use Node.js?
Q38: How does Node.js handle child threads?
Q39: What is the preferred method of resolving unhandled exceptions in Node.js?
Q40: What is stream and what are types of streams available in Node.js?
Q41: What are the global objects of Node.js?
Q42: When should I use EventEmitter?
Q43: How do you debug Node.js applications?
Q44: Rewrite promise-based Node.js applications to Async/Await
Q45: What is the relationship between Node.js and V8?
Q46: What is N-API in Node.js?
Q47: Explain the concept of Domain in Node.js
Q48: What are the use cases for the Node.js “vm” core module?
Q49: What is a blocking code?
Q50: What’s the event loop?
Q51: How to use Buffer in Node.js?
Q52: Are you familiar with differences between Node.js modules and ES6 modules?

Senior

Q53: What is Piping in Node?
Q54: Name some of the events fired by streams.
Q55: What is the purpose of __filename variable?
Q56: How can you listen on port 80 with Node?
Q57: What tools can be used to assure consistent code style?
Q58: What’s a stub?
Q59: Does Node.js support multi-core platforms?
Q60: Is Node.js entirely based on a single-thread?
Q61: Is Node.js entirely based on a single-thread?
Q62: When to not use Node.js?
Q63: Why to use Buffers instead of binary strings to handle binary data ?
Q64: How to gracefully Shutdown Node.js Server?
Q65: What are the timing features of Node.js?
Q66: Explain usage of NODE_ENV
Q67: What is LTS releases of Node.js why should you care?
Q68: Provide some example of config file separation for dev and prod environments

Q69: How would you handle errors for async code in Node.js?
Q70: What’s the difference between dependencies, devDependencies and peerDependencies in npm package.json file?
Q71: How do you convert an existing callback API to promises?
Q72: What are async functions in Node?
Q73: Can Node.js work without V8?
Q74: How the V8 engine works?
Q75: How does the cluster module work?
Q76: Is it possible to use “Class” in Node.js?

Expert

Q77: Can Node.js use other engines than V8?
Q78: Consider following code snippet

{
  console.time("loop");
  for (var i = 0; i < 1000000; i += 1) {
    // Do nothing
  }
  console.timeEnd("loop");
}


Q79: How would you scale Node application?
Q80: What is the difference between process.nextTick() and setImmediate() ?
Q81: How to solve “Process out of Memory Exception” in Node.js ?
Q82: Explain what is Reactor Pattern in Node.js?
Q83: Explain some Error Handling approaches in Node.js you know about. Which one will you use?
Q84: Why should you separate Express ‘app’ and ‘server’?
Q85: Rewrite the code sample without try/catch block

async function check(req, res) {
  try {
    const a = await someOtherFunction();
    const b = await somethingElseFunction();
    res.send("result")
  } catch (error) {
    res.send(error.stack);
  }
}


Q86: How many threads does Node actually create?
Q87: What is the purpose of using hidden classes in V8?
Q88: How V8 compiles JavaScript code?
Q89: How does libuv work under the hood?
Q90: What is V8 Templates?
Q91: Why do we need C++ Addons in Node.js?
Q92: Why Node.js devs tend to lean towards the Module Requiring vs Dependency Injection?
Q93: What will happen when that code will be executed?

Sliding Sidebar

About Me

About Me

Hello, my name is Dũng (Johnny). Welcome to my blog.

As I’m a developer, I write about topics related to the field of programming, mainly from a technical point of view. On this blog you’ll find posts which encourage discussion, information about development trends, case studies, reviews, tutorials, tips on how to improve your effectiveness, and anything else that might be fascinating to people from the IT industry.
I love PHP, NodeJS, Java,... and Fullstack.