JSFiddle - React, Tailwind, and code Playground

JavaScript

function Stage(){}
Stage.prototype.start = function(key) {
console.log(key);
           var self = this; //cache this here
            //var maxScrollLeft = document.getElementById("content").scrollWidth;
            
                    setTimeout(function() {
                            self.start(key+2); //use it to make the call
                    },1000); 
            
    }   
var stg = new Stage();
stg.start(1);