Undercover Bugger, 24/100 Days of Code
Good thing I decided to clean up my code. I ended up finding and fixing a nasty bug.
Before, my code output a jumbled mess of test information. The output now displays the obtained address numbers and names. I also applied a bugfix to prevent the list of street numbers and names from resetting with each iteration of the do while loop.
Truthfully, the variables for these lists were declared in the wrong place…inside the do while loop. I followed the same steps as I did with the return variable and declared them outside of the loop.
I could declare special variables like these at the start of methods to ensure their scope is always within reach. If I need a counter or something with a distinct scope, I can declare it accordingly.
The next step will be adding the address information to the right lists and separating it with commas.
-CF