Add office photos
Engaged Employer

Birlasoft

3.6
based on 2.9k Reviews
Video summary
Filter interviews by

Larsen & Toubro Limited Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations
Q1. What are some design patterns in JavaScript and how do they work?
Ans.

JavaScript design patterns are reusable solutions to common problems in software design.

  • Some common design patterns in JavaScript include Module, Singleton, Observer, Factory, and Prototype.

  • Module pattern helps in creating encapsulated modules with private and public methods.

  • Singleton pattern ensures a class has only one instance and provides a global point of access to it.

  • Observer pattern allows objects to subscribe and unsubscribe to events and be notified of changes.

  • Factor...read more

Add your answer
Q2. What is a state in React and how is it used?
Ans.

A state in React is a JavaScript object that stores data relevant to a component and can be updated over time.

  • State is initialized in a component's constructor using this.state = {}

  • State can be updated using this.setState() method

  • State changes trigger re-rendering of the component

Add your answer
Q3. What is the difference between 'slice' and 'splice' in programming?
Ans.

Slice is a method that extracts a portion of an array without modifying the original array, while splice is a method that adds or removes elements from an array.

  • Slice returns a shallow copy of a portion of an array based on start and end index parameters.

  • Splice can add new elements to an array or remove existing elements by specifying the start index and number of elements to remove.

  • Example: const arr = [1, 2, 3, 4, 5]; arr.slice(1, 3) will return [2, 3], while arr.splice(1, ...read more

Add your answer
Q4. What is the prototype chain in JavaScript?
Ans.

Prototype chain in JavaScript is the mechanism by which objects inherit properties and methods from other objects.

  • In JavaScript, each object has a private property which holds a link to another object called its prototype.

  • If a property or method is not found on an object, JavaScript will look for it in the object's prototype, and so on up the chain.

  • This allows for inheritance in JavaScript, where objects can inherit properties and methods from their prototypes.

Add your answer
Discover Larsen & Toubro Limited interview dos and don'ts from real experiences
Q5. What is the difference between React context and React Redux?
Ans.

React context is a built-in feature for passing data through the component tree, while React Redux is a library for managing global state in React applications.

  • React context is used for passing data down the component tree without having to pass props manually at every level.

  • React Redux is a library that provides a centralized store for managing global state in a React application.

  • React context is built into React, while React Redux is a separate library that needs to be inst...read more

Add your answer
Q6. What are closures?
Ans.

Closures are functions that have access to variables from their containing scope even after the function has finished executing.

  • Closures allow functions to access variables from their outer scope

  • They maintain a reference to the variables even after the outer function has finished executing

  • Closures are commonly used in event handlers and callbacks

Add your answer

Q7. Xa and non xa difference

Ans.

XA is a distributed transaction protocol while non-XA is not.

  • XA is used for distributed transactions that involve multiple resources.

  • Non-XA is used for local transactions that involve a single resource.

  • XA ensures transactional consistency across multiple resources.

  • Non-XA does not provide transactional consistency across multiple resources.

  • XA involves a two-phase commit protocol while non-XA does not.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Larsen & Toubro Limited

based on 6 interviews
3 Interview rounds
Technical Round - 1
Technical Round - 2
Technical Round - 3
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Senior Software Developer Interview Questions from Similar Companies

3.8
 • 26 Interview Questions
3.5
 • 21 Interview Questions
3.8
 • 17 Interview Questions
4.5
 • 16 Interview Questions
3.6
 • 16 Interview Questions
3.7
 • 11 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
70 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