JSFiddle - React, Tailwind, and code Playground

HTML

<div id="timedMsgDiv"></div>

JavaScript

function timedMsg() {
    currMsg++;
    document.getElementById('timedMsgDiv').innerHTML = msgArr[currMsg % msgArr.length];
};

function init() {
    currMsg = -1;
    msgArr = ['Computer.', 'Uploading', 'Random'];
    timedMsg();
    var t = setInterval(timedMsg, 2000);
};

window.onload = init;