1 //JAVASCRIPT
2 var count = 0;
3 function counter() {
4 document.getElementById("counter").innerHTML = count;
5 count = count + 1;
6 setTimeout(counter, 1000)
7 }
8 counter();
9
10 //HTML
11 Counter <span id="counter"> 0 </span>
12
13
14