Make your own digital clock

🔰Make your own digital clock 🔰

/*
Task Description: Modify the code, create your own fancy digital clock!
*/
function start() {
    var today = new Date();
    var h = today.getHours();
    var m = today.getMinutes();
    var s = today.getSeconds();
    m = correctTime(m);
    s = correctTime(s);
    document.getElementById('clock').innerHTML = h + ":" + m + ":" + s;
    var t = setTimeout(start, 1000);
}

// Adding the zero if needed
function correctTime(i) {
    if (i < 10) {
        i = "0" + i;
    }
    return i;
}

Popular posts from this blog

⚠️List of terms used in the field of hacking.⚠️

how to crack password of Rar File.

🔥How to Embed a backdoor in a PDF file❓