Digital clock alarm using javascript

Hello, folks
I have created a digital (using Javascript). But I am trying to go one step further by adding alert for specific times of the day. For instance, at 11:30 am, an alert message will display this message “It is time for brunch”. I have set the hour, minute, seconds, and session, as h, m, s, and session. The code is down below:

function digiClock() {
  var today = new Date();
  var h = today.getHours();
  var m = today.getMinutes();
  var s = today.getSeconds();
	var session = "AM"
	if (h > 11){
		session = "PM"
  // add a zero in front of numbers<10
  m = checkTime(m);
  s = checkTime(s);
  document.getElementById("clock").innerHTML = h + ":" + m + ":" + s + session;
  var t = setTimeout(function(){ digiClock() }, 500);

function checkTime(i) {
  if (i < 10) {
    i = "0" + i;
  return i;

function alarm(){
	if(h == 10 && m ==21 && s==00 && session=="AM"){
		alert("It is 10:30am, time to take a break fromcoding");

Please do not use the #general subforum if there is a more approrpiate subforum.
I am moving your thread to #help subforum

Okay, since you moved my thread to #help subforum, I haven’t gotten any response yet. Out of curiosity, I just wanted to know how long does it take to get a response.

it depends on when someone able and willing to help you will open this thread, in short, I have no idea