JSFiddle - React, Tailwind, and code Playground

HTML

<a></a>
<a>aaaaa</a>

CSS

.redtext0 { color:blue }
.redtext1 { color:red }
.redtext2 { color: green }
.redtext3 { color:yellow}

JavaScript

window.onload = function(){
     var i = 0,
          light = function() {
               if (i<4) {
                    document.getElementsByTagName('a')[1].className += " redtext" + i;
                    i += 1;
                    t = setTimeout(light, 50);
               }
          };
     document.getElementsByTagName('a')[1].onmouseover = light;
}