garageScript / curriculum

GarageScript Curriculum
21 stars 163 forks source link

js3/2 sum: Handle when first element is skipped #386

Closed flacial closed 2 years ago

flacial commented 2 years ago

A student submitted a solution that skips the first element, and it had passed all the tests.

solution([1, 2, 3], 3) returns false because the implementation only iterator through [2, 3].