I am having an issue figuring this out. The idea is that I have an array of values that I'm considering times, and I need to remove all values that overlap with a specific time:
var availableTimes = ['0 - 0.5', '0.5 - 1', '1 - 1.5', '1.5 -2', '2 - 2.5', '2.5 -3']
var timeToRemove = '0.5 - 2'
I have full control over what the array looks like, but that's the idea. I can't figure out how to construct my array of available times and my timeToRemove so that I can accomplish this. I am using a 24:00 hour clock, so 1 - 1.5 is 1:00 AM to 1:30 AM.
Any thoughts on the best way to construct this?
filterfor that - developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…