- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
const el = document.getElementById('col');
let iterator = next();
function* next() {
const arr = ["green", "blue", "red", "orange"];
for (var i = 0; i <= arr.length;) {
yield arr[i++];
}
}
(function newBackground() {
el.style.background = iterator.next().value;
setTimeout(newBackground, 1000);
}());
guest 24.10.2016 23:59 # 0
guest 25.10.2016 00:09 # 0
guest 25.10.2016 00:33 # 0
guest 28.10.2016 05:39 # 0