Coding Questions

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

Need a more guided set of questions?

During a code review, you spot this comparison in a payment processing function. What potential issue exists in this code?

Loading stats...

Not Answered

JavascriptType coercionOperators+2
Beginner
What's the correct implementation for this simplified virtual DOM diffing algorithm?

Loading stats...

Not Answered

JavascriptDomVirtual dom+3
Hard
You're building a plugin system that needs to safely extend built-in objects. What's wrong with this implementation and which solution correctly fixes the issues?

Loading stats...

Not Answered

JavascriptPrototypesObject properties+2
Hard
In a React form component, fill in the missing code to properly handle form submission

Loading stats...

Not Answered

ReactFormsState management+1
Easy
What will this code output and why?

Loading stats...

Not Answered

AsyncEvent loopPromises+1
Medium
You're building a multi-step form wizard in React that needs to maintain state between steps and handle navigation. What's missing in this implementation?

Loading stats...

Not Answered

ReactFormsState management
Medium
What will the following code output, and why?

Loading stats...

Not Answered

ReduceArraysJavascript
Medium
How can you ensure that an array of promises resolves in sequence instead of in parallel?

Loading stats...

Not Answered

AsyncPromisesSequence+1
Medium
You're building a task management system and need to manipulate a list of tasks. What's incorrect about this implementation?

Loading stats...

Not Answered

JavascriptArraysArray methods+1
Beginner
If statements in JavaScript

Loading stats...

Not Answered

JavascriptIf elseComparison+1
Beginner
You're implementing error boundaries in your React application. What's wrong with this implementation, and which answer correctly implements the missing methods?

Loading stats...

Not Answered

ReactError boundariesClass components+2
Medium
How can you create a custom event in JavaScript and dispatch it?

Loading stats...

Not Answered

DomEventsJavascript
Medium
What will be logged, and why?

Loading stats...

Not Answered

TypeofInstanceofJavascript quirks
Easy
You're working on a weather forecasting app that needs to format temperature values. Complete the missing code in the following utility function that converts temperatures and handles edge cases

Loading stats...

Not Answered

AlgorithmsMathUtility functions
Easy
Your application's theme context is causing unnecessary re-renders. What's the optimal way to fix the performance issue in this code?

Loading stats...

Not Answered

ReactContextPerformance+2
Hard