DEV Community

Discussion on: Daily Challenge #278 - Find all non-consecutive numbers

Collapse
 
bb4l profile image
bb4L

for clarification, from the challenge:

E.g., if we have an array [1,2,3,4,6,7,8,15,16] then 6 and 15 are non-consecutive.
You should return the results as an array of objects with two values i: 'the index of the non-consecutive number' and n: 'the non-consecutive number'.