I created following script for countdown clock. I want to dynamically create HTMLElement (span) and update innerHTML using window.setInterval; My problem is with updating current date without creating a new group of spans.I created following script for countdown clock.