// 动态打印当前时间
function getTime() {
const now = new Date()
const hours = now.getHours().toString().padStart(2, '0')
const minutes = now.getMinutes().toString().padStart(2, '0')
const seconds = now.getSeconds().toString().padStart(2, '0')
console.log(hours + ':' + minutes + ':' + seconds);
}
setInterval(getTime, 1000)