Filter interviews by
Be the first one to contribute and help others!
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...
I applied via Naukri.com and was interviewed in Feb 2024. There was 1 interview round.
DOM stands for Document Object Model, which is a programming interface for web documents.
DOM is a representation of the structure of a web page, allowing scripts to dynamically access and update the content, structure, and style of the document.
It provides a way for scripts to interact with the web page by accessing and manipulating elements like text, images, forms, etc.
DOM is platform and language-independent, allowi...
Promises in TypeScript are objects representing the eventual completion or failure of an asynchronous operation.
Promises are used to handle asynchronous operations in a more readable and manageable way.
They can be in one of three states: pending, fulfilled, or rejected.
Promises can be chained using .then() to handle success and .catch() to handle errors.
Example: const myPromise = new Promise((resolve, reject) => { ...
Hooks in JavaScript are functions that let you use state and other React features without writing a class.
Hooks were introduced in React 16.8 to allow functional components to have state and lifecycle methods.
useState() is a hook that allows you to add state to functional components.
useEffect() is a hook that allows you to perform side effects in functional components.
Custom hooks are functions that allow you to reuse
Generate an array of prime numbers from 1 to 100.
Iterate from 1 to 100 and check if each number is prime
A prime number is only divisible by 1 and itself
Start with a list of prime numbers and check divisibility
Finding missing values in array using JavaScript and incrementing/decrementing count in React.
Use JavaScript to find missing values in array by comparing with a reference array.
Implement logic to increment and decrement count in React based on user interactions.
Example: const array = ['apple', 'banana', 'orange']; const referenceArray = ['apple', 'banana', 'grape'];
Example: Implement a counter component in React that i...
I appeared for an interview in Mar 2024.
1. Client-side scripting runs on the user's browser, while server-side scripting runs on the server. 2. Destructuring is a way to extract values from objects and arrays. 3. HOC stands for Higher Order Component in React. 4. Combining nested arrays involves flattening them into a single array. 5. Counting vowels in a string involves iterating through the characters and checking if they are vowels.
Client-side scripting e...
Given a matrix of zeros and ones, find the minimum distance for each one to a zero.
Use breadth-first search (BFS) to find the minimum distance from each one to a zero.
Start by initializing a queue with all the zeros in the matrix.
While the queue is not empty, dequeue a zero and enqueue its neighboring ones.
Keep track of the distance from each one to the nearest zero.
Repeat until all ones have been visited.
Return the ma
I applied via Indeed and was interviewed in Aug 2022. There was 1 interview round.
Interview asked all about my self
what are currently doing. family background education background also
Discuss about my project and front end Development as well
I appeared for an interview in Sep 2022.
Promise is an object representing the eventual completion or failure of an asynchronous operation.
Promises are used to handle asynchronous operations in JavaScript
They are a cleaner alternative to callbacks
Promises have three states: pending, fulfilled, or rejected
They can be chained together using .then() and .catch() methods
Example: new Promise((resolve, reject) => {...})
Controlled components are React components whose value is controlled by React, while uncontrolled components are not.
Controlled components are typically used for forms and inputs
Uncontrolled components are typically used for simple inputs like text fields
Controlled components use the 'value' prop to set the value of the component
Uncontrolled components use the 'defaultValue' prop to set the initial value of the compone...
Counter app to increase the value
TCS
Accenture
Wipro
Cognizant