title: how to find free time slot of a day if busy slots are given in nodejs
body: <p>For example clinic working hours on specific date are as follow:</p>
  
  <pre><code>var workingStartTime = 2018-05-12T08:00:00.000Z; 
  var workingEndTime = 2018-05-12T22:00:00.000Z;
  </code></pre>
  
  <p>Doctor's already scheduled appointments on the same date are as follow:</p>
  
  <pre><code>var busySlots = 
  [ { 
  start_time: '2018-05-12T14:30:00.000Z',end_time:'2018-05-12T17:45:00.000Z' 
  },
  { 
  start_time: '2018-05-12T20:30:00.000Z',end_time: '2018-05-12T21:45:00.000Z' 
  }]
  </code></pre>
  
  <p>I need to fetch available time slots of doctor which are greater than 60 minutes starting from <code>2018-05-12T08:00:00.000Z</code> to <code>2018-05-12T22:00:00.000Z</code>
  timings of a day with minimum line of code in nodejs.    </p>
  
  <p>Following problem is similar to my query:</p>
  
  <p><a href="https://stackoverflow.com/questions/25975246/how-to-find-free-time-slot-based-on-available-time-slot-and-booked-time-slot">How to find free time slot based on available time slot and booked time slot?</a>    </p>
  
  <p>But above code is in php and i need code written in nodejs.</p>