Open pdavidow opened 11 months ago
That's a valid alternative. I didn't write this chapter, but if I had to guess at the intent, it's that it's better to declare variables as close as possible to their point of use. Declaring a single mutable variable would probably not affect the performance of the program, so it's a largely stylistic choice.
Why not just declare
guess
once, like this:instead of what's presented: