Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html>
<html>
<head>
<title>Color Cycle</title>
</head>
<body>
<script>
const colors = ["red", "green", "blue"]
let i = 0
setInterval(() => {
document.body.style.backgroundColor = colors[i]
i = (i+1)%colors.length
}, 1000)
</script>
</body>
</html>Coding works best on desktop or with an external keyboard.