cara memperbarui html sebelum peringatan

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