BugHunt

JavaScript array exercises

Arrays are where JavaScript's quiet failures pile up: reading past the end gives undefined instead of an error, sort() compares numbers as text, and an empty array is truthy. Each exercise is a short function with one such bug and tests that catch it.

They range from loop bounds and missing returns to sort, reduce and async callbacks.

See the 32 exercisesOr follow the 30-day path

The arrays bugs you will meet

The exercises

Errors you might be searching for

More JavaScript practice by topic

Questions

Are these interview questions?

Some are: the ones titled "AI Attempt" are classic interview problems with a plausible but wrong answer. The rest are everyday bugs.

Is there a certificate?

Yes, free. Fixing 15 easy JavaScript bugs while signed in earns JavaScript Debugging · Level 1.