Filter interviews by
I applied via Recruitment Consulltant and was interviewed before Feb 2023. There were 3 interview rounds.
Build a file structure
Use an array of strings to represent the file structure
Each string in the array represents a file or directory
Use a specific format to differentiate between files and directories
Include the parent-child relationship between directories
Top trending discussions
posted on 14 Sep 2024
I applied via Naukri.com and was interviewed in Aug 2024. There was 1 interview round.
A closure is a function that has access to its own scope, as well as the scope in which it was defined.
A closure allows a function to access variables from its outer function even after the outer function has finished executing.
Closures are created whenever a function is defined within another function.
Example: function outerFunction() { let outerVar = 'I am outer'; return function innerFunction() { console.log(outerVa
Async/await is a feature in JavaScript that allows for asynchronous code to be written in a synchronous manner.
Async/await is built on top of promises and provides a more readable and concise way to work with asynchronous code.
The 'async' keyword is used to define a function as asynchronous, allowing it to use the 'await' keyword inside it.
When 'await' is used, it pauses the execution of the function until the promise ...
Use Set to remove duplicates from array of strings.
Create a Set from the array to automatically remove duplicates
Convert the Set back to an array if needed
Example: const arr = ['apple', 'banana', 'apple', 'orange']; const uniqueArr = [...new Set(arr)];
React DOM updates by comparing the virtual DOM with the actual DOM and only updating the necessary components.
React creates a virtual DOM to represent the UI components.
When a state or prop changes, React re-renders the virtual DOM.
React then compares the virtual DOM with the actual DOM to identify the differences.
Only the necessary components are updated in the actual DOM, minimizing performance impact.
React Hooks are functions that let you use state and other React features without writing a class.
React Hooks were introduced in React 16.8.
They allow you to use state and other React features in functional components.
Some commonly used hooks are useState, useEffect, useContext, and useRef.
Hooks make it easier to reuse logic across components.
Hooks can be used to manage component state, perform side effects, and more.
Call, bind, and apply are methods used to manipulate the value of 'this' in JavaScript functions.
Call - invokes a function with a specified 'this' value and arguments provided individually.
Bind - creates a new function that, when called, has its 'this' keyword set to the provided value.
Apply - invokes a function with a specified 'this' value and arguments provided as an array.
Redux Toolkit is a set of tools and best practices to simplify Redux development, while Redux is a predictable state container for JavaScript apps.
Redux Toolkit provides a set of tools like createSlice, createAsyncThunk, and configureStore to simplify Redux setup and reduce boilerplate code.
Redux Toolkit includes immer library for writing immutable update logic in a more convenient way.
Redux Toolkit also includes a def...
Writing a RTL test to check a button in React
Use the render and fireEvent functions from @testing-library/react
Find the button element using getByRole('button')
Simulate a click event using fireEvent.click
Assert that the button is visible and clickable
Inline and block level elements in HTML/CSS
Inline elements flow in the document in a line, without starting a new line. Examples include , , .
Block level elements start on a new line and take up the full width available. Examples include
,
Microtasks in JavaScript are tasks that are executed asynchronously and have higher priority than regular tasks.
Microtasks are scheduled to run after the current script has finished but before the browser has a chance to render.
They are often used with promises, as promise callbacks are executed as microtasks.
Microtasks are executed in the same event loop iteration as regular tasks, but before the next rendering.
Exampl...
Custom hooks are reusable functions that allow you to extract component logic into separate functions.
Custom hooks are prefixed with 'use' and can call other hooks if needed.
They can be used to share logic between components without duplicating code.
Custom hooks can be created for any kind of logic, such as fetching data, managing state, or handling side effects.
Redux is a predictable state container for JavaScript apps. It helps manage the state of an application in a centralized store.
Create a Redux store to hold the state of the application
Define actions to describe state changes
Write reducers to specify how the state changes in response to actions
Dispatch actions to update the state in the store
Connect components to the Redux store using the connect function from react-red
Redux is a predictable state container for JavaScript apps.
Actions are dispatched to the store
Reducers specify how the state changes in response to actions
Store holds the state of the application
Components can subscribe to the store to access state
Coding a frontend UI from provided image. And creating a fucntional star rating system
Designing a Component API in React using Typescript involves defining props, state, and methods for the component.
Define the props interface to specify the expected input data for the component
Use typescript types to ensure type safety and prevent runtime errors
Define the state interface to manage the internal state of the component
Implement methods to handle user interactions and component logic
Document the component
Function to clear all timer ids at once
Create an array to store all timer ids
Iterate through the array and clear each timer id using clearTimeout() function
I applied via Naukri.com and was interviewed in Jun 2024. There were 3 interview rounds.
It was a hacker coding test mostly javascript questions
Context API is a feature in React that allows sharing data between components without having to pass props manually.
Create a context using createContext() method
Use the Provider component to wrap the components that need access to the context
Access the context data using the useContext() hook within the consuming components
Debugging a code involves identifying and fixing errors in the code to ensure it runs correctly.
Use console.log() statements to print out values and check for errors
Utilize browser developer tools to inspect elements and debug JavaScript
Step through the code using breakpoints to identify the source of the issue
Review error messages and stack traces to pinpoint the problem
Consider using tools like linters and debuggers
Employee details can be retrieved using group by clause in SQL.
Use GROUP BY clause in SQL to group employee details based on a specific column
Aggregate functions like COUNT, SUM, AVG can be used with GROUP BY to get summarized employee details
Example: SELECT department, COUNT(*) as total_employees FROM employees GROUP BY department
I applied via Naukri.com and was interviewed in Mar 2024. There was 1 interview round.
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
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
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
I have used React hooks such as useState, useEffect, useContext, and useRef in my projects.
useState
useEffect
useContext
useRef
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
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
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
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 ...
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.
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.
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
I applied via Naukri.com and was interviewed in Feb 2024. There were 3 interview rounds.
React is a JavaScript library for building user interfaces.
React allows for the creation of reusable UI components
It uses a virtual DOM for efficient rendering
React is declarative, making it easier to understand and debug code
Creating a simple app using Redux for state management in a front end application.
Set up Redux store with reducers and actions
Connect components to Redux store using mapStateToProps and mapDispatchToProps
Dispatch actions to update state in Redux store
Use combineReducers to manage multiple reducers
Agile process involves iterative development, frequent collaboration, and adaptability to changes.
Daily stand-up meetings to discuss progress and roadblocks
Sprints for focused development and testing
Continuous feedback and iteration based on user input
Use of tools like Jira or Trello for project management
I applied via Naukri.com and was interviewed in Mar 2024. There was 1 interview round.
Front end developers are in high demand due to the increasing importance of user experience in web development.
Front end developers work on the client side of web development, focusing on the user interface and user experience.
They are responsible for implementing designs, optimizing performance, and ensuring cross-browser compatibility.
Front end developers often use HTML, CSS, and JavaScript, as well as frameworks lik...
Reasoning is the mental process of thinking, understanding, and forming conclusions.
Reasoning involves using logic and critical thinking to make sense of information.
It helps in problem-solving and decision-making by analyzing and evaluating evidence.
Types of reasoning include inductive reasoning, deductive reasoning, and abductive reasoning.
Time queue in API refers to managing requests in a sequential order.
Time queue ensures that API requests are processed in the order they are received.
It helps in preventing overload on the server by limiting the number of concurrent requests.
Examples include using promises or async/await in JavaScript to handle API calls sequentially.
I applied via Naukri.com and was interviewed in Jul 2024. There was 1 interview round.
React js Assessments
Fashion Designer
5
salaries
| ₹4.1 L/yr - ₹5.5 L/yr |
Senior Designer
4
salaries
| ₹9.6 L/yr - ₹18.4 L/yr |
Senior Merchandiser
4
salaries
| ₹8 L/yr - ₹12 L/yr |
Junior Fashion Designer
4
salaries
| ₹4 L/yr - ₹4.5 L/yr |
Software Engineer
3
salaries
| ₹7.5 L/yr - ₹19.5 L/yr |
Flipkart
Amazon
Paytm
Snapdeal