Published on: 24 Oct, 2014

How to check conflict time in Javascript?

Tumblr Digg Google Plus

This is a quick experiment to check conflict times in Javascript. The idea is to compare start and end time with a given list times array. The time will be completely in number (integer) format. There will be two arrays store the start and end times. The process checking will use a for loop to compare if the start and end time is positioned between the array of start and end time. If it found there is a conflict, it will return a console writing to CONFLICT includes with the times, otherwise it will return the NO CONFLICT word.

See below example codes for more details. To run this sample, simply copy the whole script and paste it into a html file.


There are no comments available.

Write Comment
0 characters entered. Maximum characters allowed are 1000 characters.