title: Check Date exist in Javascript date array
body: <p>I have an array of date object and want to check if supplied date exists in the array by array.indexOf method but it's always returning -1 (not found). Although date exists in the array.</p>
  
  <p><a href="https://i.stack.imgur.com/vI68E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vI68E.png" alt="Please have a look at attachment."></a></p>
  
  <p>availableDates[62] and Date have the same value when I print in the console but the condition is returning false.</p>