JSFiddle - React, Tailwind, and code Playground

JavaScript

var txt="xxx xxx xxx xxx xxx ";i=5;
while(i--){
 txt=txt.split('');
 var l=txt.shift();
 txt.push(l);
 txt=txt.join('');
 console.log(txt);
}