NodeJS Interview Experience

Round – 1 (Technical – Basics)

  • The first round consists of testing knowledge of JavaScript & database concepts.
  • Initially, the interviewer asked me about the variable scoping concepts along with their coding examples.
    • He asked me to differentiate between let, var, and const variables and tested my understanding of const with objects/arrays and with primitive datatypes of JavaScript
    • He asked me to explain the basic operations (add/update/remove a property) on an object.
  • Then my knowledge of the application’s various built-in methods on string & array was tested.
    • Example: Reverse a sentence using string and array methods
      • Input string: “Guidelines to improve”
      • Expected output: “Improve to Guidelines”
  • Then again, the questions were from basic JavaScript concepts, like “How to find the datatype of a variable having value? ” & “How to check if a variable, has a numeric value or not?”
  • Later interviewer asked the questions about ES6 concepts of JavaScript such as the rest and spread operators in JS and asked me a question about where the spread operator can be used i.e. to combine 2 objects and form a new object.
  • Since the Job offered was NodeJS developer, the interviewer asked me to define NodeJS.
  • Then he tested my knowledge of database-related topics. Since I worked on MongoDB, questions were related to that.
    • Initially, I was asked to write aggregation queries based on a DB example given by the interviewer, I was asked to explain the written query and explain different types of pipeline operators and stages.
    • I was asked to explain the flow of data in the aggregation pipeline.
    • Later, he asked me to explain the concept of indexing in MongoDB.
  • Finally, very basic knowledge of relation DB (SQL) was tested, where the interviewer asked me to write & explain 2 of the basic queries of MySQL.

Round – 2 (Technical – Advanced)

  • The second round involved testing my knowledge in advanced concepts of backend development related to NodeJS & MongoDB and also about my previous work experience.
  • Initially, the interviewer asked me to explain the workflow of NodeJS based on a client request.
  • Then she asked me if NodeJS was single-threaded, if yes, then how it would handle concurrency.
  • She asked me to explain different types of API calls concerning node workflow.
  • She asked me to explain the use case of the NodeJS server, and its advantages and disadvantages.
  • Then I was asked to explain how external libraries/packages can be used NodeJS project.
  • I was asked to explain the difference between fork() and spawn() regarding process management.
  • Later interviewer asked me a few questions related to MongoDB such as, how to connect MongoDB to the NodeJS project.
  • I was asked to write a query to find 2nd highest value from a category of value. I solved it by using the aggregation concept of MongoDB.
  • Since I had work experience in frontend development using the Angular framework, the interviewer asked a few questions from that technical stack too.
    • I was asked to explain the difference in features, between older and newer versions of Angular, I have used.
    • I was asked to explain the key concepts of Angular such as lazy loading, pipes, and basic angular project structure.
  • The interviewer asked me to explain the difference between the 2 tech stacks I have used in my previous work, i.e., NodeJS & Angular.
  • Finally, she asked me to discuss, if I had faced any challenging situation in my previous work and explain what the challenge, learning, and resolution are involved there.