A timer will be created when the first call returns. Another timer will be created when the timer call returns, and one will be closed at the same time. It seems that this process is always repeated, and there is always a timer. I don't understand what function you want to implement, but it will feel better if you take the code to create the timer outside the return method.
Because every time you call goBack, a new timer will be opened
A timer will be created when the first call returns. Another timer will be created when the timer call returns, and one will be closed at the same time. It seems that this process is always repeated, and there is always a timer. I don't understand what function you want to implement, but it will feel better if you take the code to create the timer outside the return method.
Put setInterval(this.goBack,50) outside this.goBack and call it