JSFiddle - React, Tailwind, and code Playground

HTML

<span id="counter"></span>

JavaScript

window.onload = function() {
    var counter = document.getElementById('counter'),
        startDate = new Date(2011, 5, 15, 0, 0, 0, 0),
        currentDate = new Date(),
        startValue = 0,
        endValue;
    
    startDateMs = Date.parse(startDate);
    currentDateMs = Date.parse(currentDate);
    endValue = (currentDateMs - startDateMs) / 1000;
    counter.innerHTML = endValue;
    
    function counting() {
        endValue ++;
        counter.innerHTML = endValue ;
    }
    
    setInterval(counting, 1000);
}