Changing background via class name and JS array
<p>I'm trying to get this to work where it will: Remove the current class (current array value) and add in the next class (next array value).</p>

<p>Essentially, this is it.</p>

<pre><code>    var myFunction= function (step) {
        if (lastEntered === step) {
            triggerEvent(step, "impress:stepleave");
            lastEntered = null;
 // Adding in an array of gradients 
var i;
var bg = new Aray();
bg[0] = "gradient-0";       
bg[1] = "gradient-1";       
bg[2] = "gradient-2";               
bg[3] = "gradient-3";       
bg[4] = "gradient-4";       
bg[5] = "gradient-5";                   
bg[6] = "gradient-6";       
bg[7] = "gradient-7";       
bg[8] = "gradient-8";                   

            for (i=0;i&lt;bg.length;i++)
            {
            body.classList.add(bg[i]);
            }
        }
    };
</code></pre>

<p><em>Where <strong>body.classList.add("gradient-1");</strong> was put, it changed the color once without disrupting the rest of the script.</em></p>

<p>Thanks!        </p>
