var clock = document.getElementById("time")
var time = setInterval(function() {
let date = new Date();
clock.innerHTML = (date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds());
}, 1000);
var p = document.querySelector('.p')
var two = document.querySelector('.two')
var date = new Date
setInterval(() => {
if(date.getHours() == 8 && date.getMinutes() >= 0 && date.getMinutes() <= 10){
p.textContent = "Going"
}
if(date.getHours() == 8 && date.getMinutes() >= 40){
p.textContent = "Completed"
}
}, 1000);
setInterval(() => {
if(date.getHours() >= 8 && date.getMinutes() >= 0 && date.getMinutes() <= 50){
two.textContent = "Going"
}
if(date.getHours() == 9 && date.getMinutes() >= 30){
two.textContent = "Completed"
}
}, 1000);