What is the difference between == and === in JavaScript?
Explain the difference between loose equality (==) and strict equality (===) operators in JavaScript. When would you use one over the other?
16
Questions in database
Explain the difference between loose equality (==) and strict equality (===) operators in JavaScript. When would you use one over the other?
Explain what closures are in JavaScript. Provide an example of when you would use a closure and explain how it works.
What are the differences between useCallback and useMemo hooks in React? When would you use one over the other? Provide examples.
Write a debounce function that delays invoking a function until after a specified wait time has elapsed since the last time it was invoked.
Explain the concept of virtual DOM in React. How does it improve performance compared to direct DOM manipulation?
Explain the differences between var, let, and const in JavaScript. When would you use each one?
Build an infinite scroll component in React that efficiently loads and displays large lists of items. Consider virtualization.
What is CSS specificity? How does the browser determine which styles to apply when there are conflicting rules?
Explain the rules of hooks in React. Why can't we call hooks inside loops, conditions, or nested functions?
Write a function that creates a deep copy of a JavaScript object. Handle nested objects, arrays, and edge cases like circular references.
Compare REST and GraphQL APIs. What are the pros and cons of each approach? When would you choose one over the other?
Explain the concept of memoization. Implement a memoize function and discuss when memoization is beneficial vs harmful.
Explain the difference between Promise.all() and Promise.allSettled() in JavaScript. When would you use each?
Write a throttle function that limits the rate at which a function can be called. It should invoke the function at most once per specified time period.
Implement Promise.all in JavaScript without using the built-in method. Handle success and failure cases correctly.
Compare cookies, localStorage, and sessionStorage. What are the use cases, limitations, and security considerations for each?