function scrollingText(word) {
let result = [];
let wordBig = word.toUpperCase();
result.push(wordBig);
for (let i = 0; i <= wordBig.length; i++) {
wordBig = wordBig.slice(1);
wordBig += wordBig[i];
}
return result;
}
scrollingText('robot');
function scrollingText(str) {
const upper = str.toUpperCase();
const result = [upper];
let current = upper;
for (let i = 1; i < upper.length; i++) {
current = current.slice(1) + current[0];
result.push(current)
}
return result;
}
scrollingText('robot');