title: Finding Gaps in a Range of Number
body: <p>I am looking for a solution (preferably JavaScript) that would find gaps in a select set of child ranges compared to their parent range.</p>
  
  <p>Example 1: If I select a parent range of {1,10} and child ranges of {1,2} and {2,10} I would have a gap of 0, meaning the range in the parent range has been completely filled by it's children.</p>
  
  <p>Example 2: If I select a parent range of {1,10} and child ranges of {1-3} and {6,8} I would have a gap of 4.</p>