Created
September 20, 2018 17:34
-
-
Save praveen-me/f71aad7241103bc054f258f340bd5a86 to your computer and use it in GitHub Desktop.
Chrome Extension Blog
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
const hourElm = document.getElementById('hour'); | |
const minutesElm = document.getElementById('minutes'); | |
// function to set time | |
function setTime() { | |
let now = new Date(); | |
hourElm.innerHTML = now.getHours(); | |
minutesElm.innerHTML = now.getMinutes(); | |
} | |
function init() { | |
//Setting Time | |
setTimeout(setTime, 1000); | |
} | |
init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment