Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Rebecca Goodman2,902 Points
Feedback on code.
I've worked with compiled languages a lot. It's hard for me to wrap my head around not needing to declare my variables up front. Code works but, is this format frowned upon? Like most, I'd probably do this with an array and a loop in any other circumstance, but I'm trying to follow along with the course. Tried to markup code with fences, let's see if it works.
Only change I would make at this stage is to remove the else statement that adds 0 as it is not needed and just adds extra lines.
Nice work, stick with the track, you will love it :)