I have an array of ranges as you can see in the snippet. when user
select certain number from dropdown I want to remove that number from
the range and return new ranges,
Everything is working as per my expectation but I think, I have over
coded and used too many if else statements in my code. I was wondering
if there is any better way to do it?
If yes please let me know, if Javascript has any methods to make this
simple and reduce the amount of code.
I have an array of ranges as you can see in the snippet. when user select certain number from dropdown I want to remove that number from the range and return new ranges,
Everything is working as per my expectation but I think, I have over coded and used too many if else statements in my code. I was wondering if there is any better way to do it?
If yes please let me know, if Javascript has any methods to make this simple and reduce the amount of code.