Skip to main content

Practice · 6 of 6

Diagnose 3: the unreset counter

CHALLENGE
Difficulty: advanced+25 XP

Classify the error, then repair longestRun so it returns the longest run of equal adjacent values. (Hint: both branches increment — one of them should not.)

Back to lesson: Practice: Diagnosis gauntlet