The purpose of this code is to have a way of working around the round-off issue presented when finding the difference between a number and the integer value of that number.
Thanks, yea I realize it exists but I really wrote the post to emphasize an interesting feature in JS:
for(anArray[counter++] in anObject)...
A few people already commented on my post saying that you can do this with Object.keys. I am in no way saying you should use this over Object.keys. In fact I updated the post to address the comments. Sorry for the confusion.