Given the following array, [6, 2, 3, 8]
find the minimum number of entries needed to make the array consecutive
[2, 3, *4*, *5*, 6, *7*, 8]
= 3 entries needed.
Test cases
makeConsecutive([0, 2]) === 2
makeConsecutive([5, 4, 6]) === 0
makeConsecutive([6, 3]) === 2
makeConsecutive([1]) === 0
makeConsecutive([1, 2, 3, 100]) === 96
makeConsecutive([1000, 100, 10, 1]) === 996
// Fill out the following code to satisfy the above tests
function makeConsecutive () {
return 0
}