SDE-1 Frontend Interview Experience at Cars24 (Javascript & ReactJS)
Overview
This document provides a detailed account of a frontend engineer (SDE-1) interview experience at Cars24. The process includes assessments of JavaScript fundamentals, ReactJS practical skills, and general behavioral attributes. The structure and questions are representative of technical interviews within competitive Indian tech companies.
Interview Rounds
The interview process consisted of three rounds:
- Round 1: Core JavaScript concepts and coding.
- Round 2: ReactJS practical assignment.
- Round 3: HR and behavioral questions.
Round 1: JavaScript & Problem Solving
This round focused on fundamental JavaScript concepts. Key topics included:
-
Hoisting: The interviewer presented code snippets with variables declared using
var,let, andconst. The candidate was expected to predict the console output, demonstrating an understanding of variable hoisting and the Temporal Dead Zone.varvariables are hoisted and initialized withundefined.letandconstvariables are hoisted but remain in the Temporal Dead Zone until their declaration is reached.
-
Implicit and Explicit Binding: The candidate was presented with scenarios involving object methods using
thisand the.call()method. They needed to explain howthisrefers to the calling context.- The candidate also demonstrated the behavior of arrow functions, which inherit their
thisvalue from the surrounding lexical scope.
- The candidate also demonstrated the behavior of arrow functions, which inherit their
-
Implementing a Memoize Function: The task involved creating a memoization function in JavaScript.
- The solution involved storing previous results in an object, using serialized arguments as keys.
- The function should return the cached result for repeated calls with identical arguments.
-
Event Loop and Output Prediction: The interviewer provided a code snippet that combined synchronous log statements,
setTimeout, and a resolved Promise. The candidate was required to explain the event loop's behavior and predict the output.- Synchronous code executes first.
- Microtasks (Promises) are processed before macrotasks (
setTimeout).
-
Infinite Currying: The challenge was to write a function that supports repeated chained calls, such as
add(5)(2)(4)(8)(), returning the cumulative sum.- The solution used recursion and closures to accumulate the sum with each call.
- The function should stop accumulating when called without arguments.
-
Chained Calculator Object: The candidate was asked to build a calculator object allowing chained method calls (e.g.,
calc.add(10).multiply(5).subtract(30).add(10)), ending with a.resultmethod to return the final value.- This required leveraging the
thiscontext and method chaining.
- This required leveraging the
Round 2: ReactJS Assignment
The candidate was tasked with implementing a file-explorer-like UI using ReactJS, simulating nested folders and files based on a JSON data structure.
- Component Design: A recursive
Foldercomponent rendered child folders and files. - Dynamic Rendering: Clicking folders toggled the expansion state using
React.useState. - Data-Driven UI: Modifying the JSON data updated the rendered folder structure.
- Best Practices: The solution implemented
keyprops in list rendering, utilized appropriate state management techniques, and promoted separation of presentation and data logic.
Follow-up Discussion: The interviewer initiated a discussion on making the Folder component more generic by using reusable prop patterns like onSelect and onExpand.
Round 3: HR Interview
This round focused on standard HR questions, including:
- Motivations for joining Cars24.
- Notice period.
- Salary expectations.
Key Takeaways
- Revise Fundamentals: A deep understanding of JavaScript fundamentals (hoisting, context, closures, event loop) is critical.
- Practical Coding Skills: Candidates should be prepared to design reusable functions, build recursive solutions, and demonstrate method chaining.
- React Coding Assignments: Expect assignments that blend state management, recursion, and dynamic UI updates.
- Communication: Clearly articulate reasoning and approaches. Communication skills are as important as providing correct answers.
Original Source
This experience was originally published on medium. Support the author by visiting the original post.
Read on medium