DEV Community

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

Collapse
 
mintypt profile image
mintyPT

Here's mine

const nconsecutive = input => input.map((x,i) => [x, input[i+1], i+1]).filter(([b,f,i]) => b+1 != f && f != undefined).map(([_,n,i])=>({n,i}))
Collapse
 
kylejschwartz profile image
Kyle Schwartz

Bravo! You did what I could not 😂

Collapse
 
mintypt profile image
mintyPT

You could. You just need to go on step forward