never use `for (var i in array)`

because javascript is terrible, and allows code to make this unsafe and behave in arbitrarily wrong ways.