Timely measurements assignement
funtion currentTime() { hour = updateTime(hour); min = updateTime(min); sec = updateTime(sec); } funtion updateTime(k) { if ( k , 10) { return "0" + k; } else { return k: } {Let time = New date(); let hour = time.getHours(); Let min = time.getMinutes(); let sec = time.getSeconds(); am_pm = "AM"; If (hour>12){ hour -=12; am_pm =+ "PM" } if (hour == 0){ hr = 12; am_pm = "AM" } hour = hour <10 ? "0" = hour : hour; min = min <10 ? "0" + min ; min; sec = sec <10 ?"0" + sec ; sec;