(#3181) - clean up "forin" loop for jshint

In my IDE the jshint plugin complains about this.
I'm not sure why it passes on the command-line or
in Travis; maybe it depends on the jshint version.

Anyway I think it's more readable this way.