how to update html before alert

Solutions on MaxInterview for how to update html before alert by the best coders in the world

showing results for - "how to update html before alert"
Alberta
28 Feb 2016
1function colorChange() {
2  document.getElementById('word').style.color = "red";
3  setTimeout(function() {
4  	alert("color changed!");
5  },10)
6}