If I want to loop over something that is not a collection I may use a for-loop in JavaScript. So to alert day numbers 0-9:
var days = 10;
for(var i = 0; i < days; i++)
alert(i);
But what would be the JQuery way of doing such a for-loop (assuming I can't use $each, as it's not a collection)?
See Question&Answers more detail:os