0
What is the syntax error?
3 Antworten
+ 8
Make sure to change the () missing function Lisa just shared in all of your setTimeout s (to avoid errors in rest of them)
Like... line 14, 18, 22 and 26
+ 4
The () are missing in the functions inside the timeouts, e.g. is should be:
setTimeout(function(){one.style.backgroundColor = "red"}, 500);
+ 4
Apart from the above, remove this and it should work, or wrap in onload()☺️:
onload = () => {
var one = document.getElementById("one");
var two = document.getElementById("two");
var three = document.getElementById("three");
var four = document.getElementById("four");
var res = document.getElementById("res");
}