This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var timeValue = "2:00 PM"; | |
var apptTimes = "10:00 AM, 12:00 PM, 3:00 PM"; | |
if (apptTimes.indexOf(timeValue) > -1) { | |
// selected time has already been added to apptTimes previously | |
alert("This time has already been added before."); | |
} |