function colorChange() { document.getElementById('word').style.color = "red"; setTimeout(function() { alert("color changed!"); },10) }