Upload Button Icon Add office photos
Engaged Employer

i

This company page is being actively managed by Tech Mahindra Team. If you also belong to the team, you can get access from here

Tech Mahindra Verified Tick

Compare button icon Compare button icon Compare

Filter interviews by

Tech Mahindra Front end Developer Interview Questions and Answers

Updated 7 Feb 2025

15 Interview questions

A Front end Developer was asked 10mo ago
Q. Write code demonstrating the use of async-await.
Ans. 

Async-await is a feature in JavaScript that allows for asynchronous programming using promises.

  • Use the 'async' keyword before a function to make it asynchronous

  • Use the 'await' keyword inside an async function to wait for a promise to resolve

  • Async-await simplifies asynchronous code and makes it easier to read and maintain

A Front end Developer was asked 10mo ago
Q. How do you add comments in JavaScript?
Ans. 

Comments in JavaScript are used to explain the code and are not executed by the browser.

  • Use // for single line comments

  • Use /* */ for multi-line comments

  • Comments help other developers understand your code

Front end Developer Interview Questions Asked at Other Companies

Q1. Non-Decreasing Array Problem Statement Given an integer array ARR ... read more
Q2. Find Unique Element in Array You have been provided an integer ar ... read more
asked in JUSPAY
Q3. Dijkstra's Shortest Path Problem Statement You are given an undir ... read more
asked in JUSPAY
Q4. Encode N-ary Tree to Binary Tree Problem Statement You are provid ... read more
Q5. Check If Linked List Is Palindrome Given a singly linked list of ... read more
A Front end Developer was asked
Q. Explain the differences between let, var, and const in JavaScript.
Ans. 

var and const are used to declare variables in JavaScript, with var being mutable and const being immutable.

  • var is used to declare variables that can be reassigned and updated

  • const is used to declare variables that cannot be reassigned or updated

  • let is another keyword used for declaring variables, similar to var but with block scope

A Front end Developer was asked
Q. What are the three stages of event propagation and how do you handle them?
Ans. 

Event propagation consists of three stages: capturing, target, and bubbling.

  • Capturing phase: Events are captured from the outermost element to the target element.

  • Target phase: Event reaches the target element where the event originated.

  • Bubbling phase: Events bubble up from the target element to the outermost element.

What people are saying about Tech Mahindra

View All
a senior engineer
1w
💼 OFFER RECEIVED – Sr. Test Engineer (Band U3) | Tech Mahindra | Noida 📎 Screenshot attached | CTC: ₹13.5 LPA
✅ Variable is paid monthly and fully (as confirmed by HR) ❓ Looking to know the MONTHLY IN-HAND SALARY after standard deductions & partial FBP usage Would appreciate any insights from current/ex-TechM folks! 🙏
FeedCard Image
Got a question about Tech Mahindra?
Ask anonymously on communities.
A Front end Developer was asked
Q. What is the difference between useReducer and useState?
Ans. 

useReducer is preferred for managing complex state logic, while useState is simpler for basic state management.

  • useReducer is more suitable for managing complex state logic and multiple state values

  • useState is simpler and more straightforward for basic state management with a single value

  • useReducer allows for more organized and centralized state updates through actions and reducers

  • useState is commonly used for simp...

A Front end Developer was asked
Q. What are error boundaries and how do you handle them?
Ans. 

Error boundary is a React component that catches JavaScript errors anywhere in a component tree and logs those errors.

  • Error boundaries are React components that catch JavaScript errors in their child component tree.

  • They are used to prevent the entire UI from crashing due to a single error.

  • Error boundaries work like a JavaScript catch {} block, but for components.

  • They are defined using componentDidCatch lifecycle m...

A Front end Developer was asked
Q. Explain the map, filter, and reduce functions.
Ans. 

Map, filter, and reduce are higher-order functions in JavaScript used to manipulate arrays.

  • Map: Transforms each element in an array and returns a new array with the transformed elements.

  • Example: [1, 2, 3].map(num => num * 2) returns [2, 4, 6].

  • Filter: Returns a new array with elements that pass a certain condition.

  • Example: [1, 2, 3].filter(num => num > 1) returns [2, 3].

  • Reduce: Applies a function against an accumul...

Are these interview questions helpful?
A Front end Developer was asked
Q. What is the use of 'never' in TypeScript?
Ans. 

The 'never' type in TypeScript represents a value that will never occur.

  • Used to indicate that a function will not return a value

  • Commonly used in union types to exclude certain values

  • Helps catch potential errors at compile time

A Front end Developer was asked
Q. What hooks have you used?
Ans. 

I have used React hooks such as useState, useEffect, useContext, and useRef in my projects.

  • useState

  • useEffect

  • useContext

  • useRef

A Front end Developer was asked
Q. How do you handle errors in your React application?
Ans. 

Errors in a React application can be handled by using error boundaries, try-catch blocks, and displaying error messages to users.

  • Use error boundaries to catch errors in components and display a fallback UI

  • Wrap code that may throw errors in try-catch blocks to handle exceptions

  • Use libraries like React Error Boundary to easily implement error handling

  • Display error messages to users to inform them about the issue and...

Tech Mahindra Front end Developer Interview Experiences

7 interviews found

Interview experience
3
Average
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
No response

I applied via Naukri.com and was interviewed in Mar 2024. There was 1 interview round.

Round 1 - Technical 

(14 Questions)

  • Q1. Let var const in JavaScript
  • Ans. 

    var and const are used to declare variables in JavaScript, with var being mutable and const being immutable.

    • var is used to declare variables that can be reassigned and updated

    • const is used to declare variables that cannot be reassigned or updated

    • let is another keyword used for declaring variables, similar to var but with block scope

  • Answered by AI
  • Q2. Error boundary and how to handle
  • Ans. 

    Error boundary is a React component that catches JavaScript errors anywhere in a component tree and logs those errors.

    • Error boundaries are React components that catch JavaScript errors in their child component tree.

    • They are used to prevent the entire UI from crashing due to a single error.

    • Error boundaries work like a JavaScript catch {} block, but for components.

    • They are defined using componentDidCatch lifecycle method...

  • Answered by AI
  • Q3. Event.bind and event.property
  • Q4. Use of never in typescript
  • Ans. 

    The 'never' type in TypeScript represents a value that will never occur.

    • Used to indicate that a function will not return a value

    • Commonly used in union types to exclude certain values

    • Helps catch potential errors at compile time

  • Answered by AI
  • Q5. What hooks you have used
  • Ans. 

    I have used React hooks such as useState, useEffect, useContext, and useRef in my projects.

    • useState

    • useEffect

    • useContext

    • useRef

  • Answered by AI
  • Q6. What is difference between use reducer and use state
  • Ans. 

    useReducer is preferred for managing complex state logic, while useState is simpler for basic state management.

    • useReducer is more suitable for managing complex state logic and multiple state values

    • useState is simpler and more straightforward for basic state management with a single value

    • useReducer allows for more organized and centralized state updates through actions and reducers

    • useState is commonly used for simple co...

  • Answered by AI
  • Q7. Why we use state and props
  • Q8. How you will pass data from parent to child
  • Ans. 

    Data can be passed from parent to child components in React using props.

    • Pass data as props from parent component to child component

    • Use state management libraries like Redux or Context API for complex data sharing

    • Use callback functions to pass data from child to parent components

  • Answered by AI
  • Q9. Write your own custom hook
  • Ans. 

    Custom hook to fetch data from an API

    • Create a function that uses the useState and useEffect hooks

    • Use the fetch API to make a request to the desired endpoint

    • Return the fetched data and loading state in an array

  • Answered by AI
  • Q10. Explain map filter and reduce functions
  • Ans. 

    Map, filter, and reduce are higher-order functions in JavaScript used to manipulate arrays.

    • Map: Transforms each element in an array and returns a new array with the transformed elements.

    • Example: [1, 2, 3].map(num => num * 2) returns [2, 4, 6].

    • Filter: Returns a new array with elements that pass a certain condition.

    • Example: [1, 2, 3].filter(num => num > 1) returns [2, 3].

    • Reduce: Applies a function against an accumulator ...

  • Answered by AI
  • Q11. How you can clone an object
  • Ans. 

    To clone an object in JavaScript, you can use the spread operator or Object.assign() method.

    • Use the spread operator to create a shallow copy of an object: const clonedObj = { ...originalObj };

    • Use Object.assign() method to create a shallow copy of an object: const clonedObj = Object.assign({}, originalObj);

    • For deep cloning, you can use libraries like Lodash or write a custom function to recursively clone nested objects.

  • Answered by AI
  • Q12. What are the three stages of event propagation and how to handle it
  • Ans. 

    Event propagation consists of three stages: capturing, target, and bubbling.

    • Capturing phase: Events are captured from the outermost element to the target element.

    • Target phase: Event reaches the target element where the event originated.

    • Bubbling phase: Events bubble up from the target element to the outermost element.

  • Answered by AI
  • Q13. How to handle errors in your react application
  • Ans. 

    Errors in a React application can be handled by using error boundaries, try-catch blocks, and displaying error messages to users.

    • Use error boundaries to catch errors in components and display a fallback UI

    • Wrap code that may throw errors in try-catch blocks to handle exceptions

    • Use libraries like React Error Boundary to easily implement error handling

    • Display error messages to users to inform them about the issue and poss...

  • Answered by AI
  • Q14. Write code to call fake api and display the title where category is “some category “
  • Ans. 

    Fetch data from a fake API and display titles based on a specific category using JavaScript and Fetch API.

    • Use the Fetch API to make a GET request to the fake API endpoint.

    • Filter the response data to find items where the category matches 'some category'.

    • Display the titles of the filtered items in the DOM.

  • Answered by AI

Skills evaluated in this interview

Interview experience
5
Excellent
Difficulty level
Easy
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via Walk-in and was interviewed in Jul 2024. There was 1 interview round.

Round 1 - Technical 

(2 Questions)

  • Q1. How to comment in javascript
  • Ans. 

    Comments in JavaScript are used to explain the code and are not executed by the browser.

    • Use // for single line comments

    • Use /* */ for multi-line comments

    • Comments help other developers understand your code

  • Answered by AI
  • Q2. Write code of async-await
  • Ans. 

    Async-await is a feature in JavaScript that allows for asynchronous programming using promises.

    • Use the 'async' keyword before a function to make it asynchronous

    • Use the 'await' keyword inside an async function to wait for a promise to resolve

    • Async-await simplifies asynchronous code and makes it easier to read and maintain

  • Answered by AI

Skills evaluated in this interview

Front end Developer Interview Questions & Answers

user image satwik tellakula

posted on 17 Jul 2024

Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(2 Questions)

  • Q1. Controlled and Un Controlled components
  • Q2. Hooks in functional components
  • Ans. 

    Hooks are functions that let you use state and other React features in functional components.

    • Hooks were introduced in React 16.8.

    • useState() hook is used to add state to functional components.

    • useEffect() hook is used for side effects in functional components.

    • Custom hooks can be created to reuse logic across components.

  • Answered by AI
Round 2 - Coding Test 

Developing features of Shopping Cart page like add to cart,remove from cart

Skills evaluated in this interview

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Selected Selected

I applied via Naukri.com and was interviewed in Feb 2024. There were 3 interview rounds.

Round 1 - Aptitude Test 

What is frount end devloper roulr what are they?

Round 2 - Coding Test 

Java script and sig tagsand out put creat page ?

Round 3 - Group Discussion 

How to slowe the error css and it will take 5to 7min pass the next person it will work or their is any errror?

Interview Preparation Tips

Interview preparation tips for other job seekers - tell your answer confedatal right or roung u shoud tell tha answer
Interview experience
5
Excellent
Difficulty level
Hard
Process Duration
Less than 2 weeks
Result
Not Selected

I appeared for an interview before Feb 2024.

Round 1 - HR 

(2 Questions)

  • Q1. This is often the first question. Focus on your professional background, your key skills, and how your experiences align with the job you're applying for.
  • Q2. Show that you’ve done your research about the company. Talk about how your values align with the company’s mission, and why the role interests you.

Interview Preparation Tips

Interview preparation tips for other job seekers - Customize your resume for each job application by highlighting relevant skills and experiences.
Interview experience
5
Excellent
Difficulty level
Easy
Process Duration
Less than 2 weeks
Result
Selected Selected

I applied via Company Website and was interviewed in Jul 2023. There were 3 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Aptitude Test 

Multiple questions and choice

Round 3 - HR 

(2 Questions)

  • Q1. Salary questions
  • Q2. Only for end of the interview

I applied via Recruitment Consulltant and was interviewed in Jan 2022. There were 5 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Aptitude Test 
Round 3 - Coding Test 
Round 4 - Assignment 
Round 5 - HR 

(9 Questions)

  • Q1. What are your salary expectations?
  • Ans. 

    I expect a competitive salary that reflects my skills, experience, and the industry standards for front-end developers.

    • Based on my research, the average salary for front-end developers in this region is between $70,000 and $90,000.

    • I have over 5 years of experience, which positions me towards the higher end of that range.

    • I am also open to discussing benefits and opportunities for growth, which can influence my overall c...

  • Answered by AI
  • Q2. What is your family background?
  • Q3. Share details of your previous job.
  • Q4. Why should we hire you?
  • Q5. Why are you looking for a change?
  • Ans. 

    I'm seeking new challenges to grow my skills and contribute to innovative projects in a dynamic environment.

    • Desire for professional growth: I'm eager to learn new technologies like React and improve my coding skills.

    • Looking for a collaborative environment: I thrive in teams that encourage brainstorming and creativity, like my previous role.

    • Interest in impactful projects: I'm motivated by work that makes a difference, s...

  • Answered by AI
  • Q6. Where do you see yourself in 5 years?
  • Q7. What are your strengths and weaknesses?
  • Q8. Tell me about yourself.
  • Q9. Tell me about your questions

Interview Preparation Tips

Interview preparation tips for other job seekers - Yes i can intresting in this company

Interview questions from similar companies

Interview Questionnaire 

2 Questions

  • Q1. Bootstrap
  • Q2. Javascript

I applied via LinkedIn

Interview Questionnaire 

1 Question

  • Q1. Questions on basic html,css,javascript,angular

Interview Preparation Tips

Interview preparation tips for other job seekers - Go specifically through the requirements mentioned in job profile before attending the interview to keep interviewer and us in the same page.

Interview Questionnaire 

1 Question

  • Q1. What is event bubling
  • Ans. 

    Event bubbling is the process of propagating an event from the innermost element to its parent elements in the DOM hierarchy.

    • Events in JavaScript are triggered on elements and then propagate up the DOM tree.

    • During event bubbling, an event triggered on a child element will also trigger on its parent elements.

    • This allows for event delegation, where a single event handler can be used for multiple elements.

    • Event.stopPropag...

  • Answered by AI

Skills evaluated in this interview

Tech Mahindra Interview FAQs

How many rounds are there in Tech Mahindra Front end Developer interview?
Tech Mahindra interview process usually has 2-3 rounds. The most common rounds in the Tech Mahindra interview process are Aptitude Test, Coding Test and HR.
How to prepare for Tech Mahindra Front end Developer interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Tech Mahindra. The most common topics and skills that interviewers at Tech Mahindra expect are Front End, Javascript, Angular, React.Js and CSS.
What are the top questions asked in Tech Mahindra Front end Developer interview?

Some of the top questions asked at the Tech Mahindra Front end Developer interview -

  1. What are the three stages of event propagation and how to handle...read more
  2. Write code to call fake api and display the title where category is “some cat...read more
  3. What is difference between use reducer and use st...read more
What are the most common questions asked in Tech Mahindra Front end Developer HR round?

The most common HR questions asked in Tech Mahindra Front end Developer interview are -

  1. Why are you looking for a chan...read more
  2. What are your salary expectatio...read more
  3. Where do you see yourself in 5 yea...read more
How long is the Tech Mahindra Front end Developer interview process?

The duration of Tech Mahindra Front end Developer interview process can vary, but typically it takes about less than 2 weeks to complete.

Tell us how to improve this page.

Overall Interview Experience Rating

4.3/5

based on 9 interview experiences

Difficulty level

Easy 43%
Moderate 43%
Hard 14%

Duration

Less than 2 weeks 100%
View more
Tech Mahindra Front end Developer Salary
based on 171 salaries
₹3 L/yr - ₹12.5 L/yr
25% more than the average Front end Developer Salary in India
View more details

Tech Mahindra Front end Developer Reviews and Ratings

based on 13 reviews

3.4/5

Rating in categories

3.9

Skill development

4.1

Work-life balance

3.0

Salary

3.5

Job security

3.7

Company culture

2.5

Promotions

3.4

Work satisfaction

Explore 13 Reviews and Ratings
Software Engineer
26.6k salaries
unlock blur

₹3.7 L/yr - ₹9.2 L/yr

Senior Software Engineer
22.2k salaries
unlock blur

₹6.4 L/yr - ₹23.8 L/yr

Technical Lead
12.4k salaries
unlock blur

₹9.8 L/yr - ₹32.9 L/yr

Associate Software Engineer
6.1k salaries
unlock blur

₹1.9 L/yr - ₹5.6 L/yr

Team Lead
5.3k salaries
unlock blur

₹6.5 L/yr - ₹17.9 L/yr

Explore more salaries
Compare Tech Mahindra with

Infosys

3.6
Compare

Cognizant

3.7
Compare

Accenture

3.8
Compare

Wipro

3.7
Compare
write
Share an Interview