Home

All Challenges

20 challenges to build your code reading skills

20 challenges100%
Difficulty
Language
Tag
01

What does this function return?

A common JavaScript function used in almost every AI-generated app.

conditionalsstringsbasics
beginner
02

Spot the async pattern

AI generates this pattern constantly when fetching data from an API.

async/awaiterror handlingfetchapi
beginner
03

Read this React hook

The most common React pattern AI writes for managing component data.

reactuseEffecthookscleanup
beginner
04

Trace this array transformation

AI uses this pattern to transform lists of data before displaying them.

arraysfiltermaptransformations
intermediate
05

Read this error message pattern

Understanding how AI structures error responses from a backend API.

validationerror handlingapifetch
intermediate
06

What does this string method return?

AI uses string methods constantly. This one trips up beginners.

stringssplitmapjoin
beginner
07

Array basics: find vs filter

Two array methods that look similar but behave very differently.

arraysfindfilterbasics
beginner
08

Object destructuring with defaults

AI generates this pattern in function parameters constantly.

destructuringdefaultsobjectsbasics
beginner
09

Promise chaining order

Understanding the order of operations in Promise chains is critical for debugging AI code.

promiseschainingasyncerror handling
intermediate
10

React useState with objects

A subtle bug AI commonly introduces when updating state that is an object.

reactuseStateobjectsspread operator
intermediate
11

Python list comprehension

Python list comprehensions are dense but powerful. AI generates them everywhere.

pythonlist comprehensionarraysfiltering
intermediate
12

TypeScript generics basics

Generics appear in almost every TypeScript codebase. AI uses them to write reusable functions.

typescriptgenericstype inferencereusability
intermediate
13

Array reduce explained

reduce is the most powerful and most misunderstood array method. AI uses it for aggregations.

arraysreduceaggregationaccumulation
intermediate
14

Closure and counter

Closures are a fundamental JavaScript concept. AI uses this pattern for factories and encapsulation.

closuresscopefactory functionencapsulation
intermediate
15

Python decorator pattern

Decorators are everywhere in Python - Flask routes, logging, caching. AI generates them constantly.

pythondecoratorshigher-order functionswrapping
advanced
16

TypeScript discriminated unions

Discriminated unions are how TypeScript models "one of several shapes". AI uses this for API responses and state machines.

typescriptdiscriminated unionstype narrowingswitch
advanced
17

Custom React hook

Custom hooks are how AI encapsulates reusable logic. Understanding them is essential for reading modern React code.

reactcustom hookslocalStoragegenerics
advanced
18

Async race condition

Race conditions in async code are a classic AI-generated bug that is hard to spot.

reactuseEffectrace conditionasync
advanced
19

Python context manager

Context managers handle setup and teardown automatically. AI uses them for files, database connections, and locks.

pythoncontext managerwith statementcleanup
advanced
20

TypeScript utility types

Utility types like Partial, Pick, and Omit appear in nearly every TypeScript project. AI generates these for API wrappers and form handlers.

typescriptutility typesOmitPickPartial
advanced