Making Code Stick: Day 5

Back after a weekend, I reviewed day 4 to reorient myself. Now I’m on the Juggling Async lesson, which is where I think I stopped the last time I didn’t complete learnyounode.

Lesson 9: Juggling Async

I made the same error in this one that I did the last time (remembering it after I made it) and that was a scope error. Instead of calling getdata() from within the for loop, I actually put that code inside the loop. The problem is that when it’s within the loop, i had a global scope and was not unique to each callback. Wrapping the getdata() in a function created a local scope for each time it was called, making the value unique to each call.

Lesson 10: Time Server

The concepts presented were simple and the coding straightforward until I kept getting an off-by-one error with the month. What asshole made the month value in Date() start at 0?

Leave a Reply

Your email address will not be published. Required fields are marked *

*