Coding Questions

Explore all the questions we have to offer. Filter by tags, difficulty, and more.

Need a more guided set of questions?

You're reviewing code and notice a component that handles user preferences. What potential issue exists in this implementation?

Loading stats...

Not Answered

ReactCode reviewError handling+1
Easy
Your team is implementing a custom form validation library. Complete the missing code in this custom hook:

Loading stats...

Not Answered

ReactFormsValidation+2
Hard
A junior developer is building a todo list application and can't figure out why their delete functionality isn't working. What's the issue with the delete functionality, and how should it be fixed?

Loading stats...

Not Answered

ReactEventsScope+1
Easy
What is the output of the following asynchronous code?

Loading stats...

Not Answered

PromisesEvent loop
Hard
What is the difference between == and === in JavaScript?

Loading stats...

Not Answered

Type coercionJavascript
Easy
In a React application, you're building a dynamic list of thousands of clickable items. Each item needs to track when it's clicked. Which implementation would be most performance-efficient and why?

Loading stats...

Not Answered

ReactEvent delegationPerformance optimization+2
Medium
You're building a data grid component that needs to handle sorting, filtering, and pagination efficiently. What's missing in this implementation to make sorting work correctly?

Loading stats...

Not Answered

ReactSortingUsememo+1
Medium
Which of the following code snippets correctly implements the map method?

Loading stats...

Not Answered

ArraysMapPrototypes+1
Hard
You're implementing an auto-save feature for a document editor. During testing, you notice that the save function is being called too frequently during rapid typing. What's the best way to optimize this code?

Loading stats...

Not Answered

ReactDebounceThrottle+2
Medium
Which array method would you use to find the first user with an age greater than 30?

Loading stats...

Not Answered

ArraysIterationFind+3
Easy
You're debugging a performance issue in a React component. The team lead mentions that unnecessary re-renders might be the culprit. What's the problem in this code?

Loading stats...

Not Answered

ReactReact performanceMemoization+2
Easy
Which method would you use to merge two arrays without modifying either of them?

Loading stats...

Not Answered

ArraysConcatSpread operator
Easy
What does the following code log to the console?

Loading stats...

Not Answered

SetArraysJavascript
Easy
You're building a caching system that shouldn't prevent objects from being garbage collected. What's wrong with the current implementation and which solution properly handles memory management?

Loading stats...

Not Answered

JavascriptWeakrefGarbage collection+2
Hard
You're building a React component for a weather dashboard. Which implementation correctly updates the temperature display?

Loading stats...

Not Answered

ReactUsestateState updates+1
Easy