I\'m trying to find an easy way to loop (iterate) over an array to find all the missing numbers in a sequence, the array will look a bit like the one below.
var nu
This can now be done easily as a one-liner with the find method:
const arr = [1,2,3,5,6,7,8,9]; return arr.find((x,i) => arr[i+1]-x > 1) + 1 //4