Increment by day in JavaScript

I had a need to iterate over days of a year today in JavaScript. I figured you could just add “one day” to the date, and that turns out to be true. This is the test program I wrote to make sure the incrementing worked properly. The answer is 366, which means that leap year […]