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
const findMissing = (numarr) => { for(let i = 1; i <= numarr.length; i++) { if(i - numarr[i-1] !== 0) { console.log('found it', i) break; } else if(i === numarr.length) console.log('found it', numarr.length + 1) } }; console.log(findMissing([1,2,3,4,5,6,7,8,9,10,11,12,13,14]))