JSFiddle - React, Tailwind, and code Playground

by Yeah

HTML

<div>Процесс пошёл <span></span></div>
<button>Стоп</button>

CSS

div {
    font-size: 20px;
}

JavaScript

var i = 0;
var timer = setInterval(function(){
    $('div span').append('.');
    i++;
    if(i > 3){
        $('div span').text('');
        i = 0; 
    }
}, 500);
$('button').click(function(e){
    e.preventDefault();
    clearInterval(timer);
});