JSFiddle - React, Tailwind, and code Playground

by Kerrick

HTML

<body bgcolor="Second Street"></body>

JavaScript

function switchColor() {
    var currentColor = document.body.getAttribute('bgcolor');
    var companyNames = ['Second Street', 'Second Street Media, Inc.'];
    switch (currentColor) {
        case companyNames[0]:
            document.body.setAttribute('bgcolor', companyNames[1]);
            break;
        default:
            document.body.setAttribute('bgcolor', companyNames[0]);
            break;
    }
};

setInterval(switchColor, 1000);