I'm trying to change the background color of the body every second but it does not work. What did I do wrong?

```
var colors = [
    "red", "blue", "green", "yellow", "red"
    ],
    rand = Math.ceil(Math.random() * colors.length - 1),
    t = setInterval(function() {
        document.body.style.backgroundColor = colors[rand];
    }, 1000);

```