JSFiddle - React, Tailwind, and code Playground

JavaScript

var Arrow = (function () {
    function Arrow() {
        this.intVariable = 1;
        this.itemId = -1;
        this.interval = 25;
    }
    Arrow.prototype.showTimer = function () {
        this.intVariable += this.interval;
        console.log(this.intVariable);
    };
    Arrow.prototype.activateTimer = function () {
        if (this.itemId === -1) {
            window.setInterval(this.showTimer.bind(this), this.interval);
        }
    };
    return Arrow;
}());
var arrow = new Arrow();
arrow.activateTimer();