<div style="width:300px; height:300px; background-color:red;" id="col"></div>
<script>
var color = ["green", "blue", "red", "orange"],
el = document.querySelector('#col');
(function f() {
var item = color.shift();
item && (el.style.background = item) && setTimeout(f, 1000)
}())
</script>