You can avoid polluting by make it an actual function and then setting the function.blinkOn instead.
You're right: individually swapping them this works better, but the intent is to have them all off or all on.
(function() { var blinkIterator = function() { var blinks = document.getElementsByTagName("blink"), onOff = blinkIterator.blinkOn ? "" : "hidden"; for (var i = 0, l = blinks.length; i < l;) blinks[i++].style.visibility = onOff; blinkIterator.blinkOn ^= 1; }; blinkIterator.blinkOn = 1; window.setInterval(blinkIterator, 750); })();
You can avoid polluting by make it an actual function and then setting the function.blinkOn instead.
You're right: individually swapping them this works better, but the intent is to have them all off or all on.