Add office photos
Engaged Employer

Birlasoft

3.6
based on 3k Reviews
Video summary
Filter interviews by

Gemini Engi Fab Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations
Q1. What is an Event Emitter in Node.js?
Ans.

Event Emitter is a class in Node.js that allows objects to emit and listen for events.

  • Event Emitter is a core module in Node.js that provides an implementation of the observer pattern.

  • It allows multiple functions to be attached to a single event, which can be triggered synchronously or asynchronously.

  • Example: const EventEmitter = require('events');

  • Example: const myEmitter = new EventEmitter();

  • Example: myEmitter.on('event', () => { console.log('an event occurred!'); });

  • Example...read more

Add your answer
Q2. How does Node.js work?
Ans.

Node.js is a runtime environment that allows JavaScript code to run on the server side.

  • Node.js uses an event-driven, non-blocking I/O model, making it lightweight and efficient.

  • It uses the V8 JavaScript engine from Google Chrome to execute code.

  • Node.js allows developers to use JavaScript for both client-side and server-side development.

  • It has a large ecosystem of libraries and frameworks, such as Express.js for building web applications.

  • Node.js can be used to build scalable n...read more

Add your answer
Q3. What are middlewares?
Ans.

Middlewares are functions that have access to the request and response objects in Node.js, allowing for additional functionality to be added to the server.

  • Middlewares can be used to perform tasks like authentication, logging, error handling, etc.

  • They are executed in the order they are defined in the code.

  • Examples of middlewares include body-parser for parsing incoming request bodies, morgan for logging HTTP requests, and express-validator for validating request data.

Add your answer

Q4. What is Hoisting ?

Ans.

Hoisting is a JavaScript mechanism where variables and function declarations are moved to the top of their scope.

  • Hoisting applies to variable declarations and function declarations

  • Variable declarations are hoisted but not their values

  • Function declarations are fully hoisted

  • Function expressions are not hoisted

  • Hoisting can lead to unexpected behavior and bugs

Add your answer
Discover Gemini Engi Fab interview dos and don'ts from real experiences

Q5. Explain Node Js architecture.

Ans.

Node Js architecture is based on event-driven, non-blocking I/O model.

  • Event loop handles all I/O operations asynchronously

  • Single-threaded event loop allows for high scalability

  • Modules and packages can be easily added through NPM

  • Uses V8 engine for efficient JavaScript execution

Add your answer

Q6. Middle-ware in node js

Ans.

Middleware is a software layer that sits between the application and the server, allowing for additional functionality to be added.

  • Middleware functions are executed sequentially, and can modify the request and response objects.

  • Common middleware includes body-parser, cookie-parser, and express-session.

  • Custom middleware can be created to add specific functionality to an application.

  • Middleware can be used for authentication, logging, error handling, and more.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Node Js Backend Developer Interview Questions from Similar Companies

 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter