Hello! Not 100% certain, but I believe it was to try and differentiate between local variables and variables attached to a function via closure.
The course is being redone, so this may be re-worked; I think in this case it's possible to allow both solutions in the newer course (it is in this one too, but at this point since it's being redone, better to deal with any confusion or discrepancies here in the forum), or to come up with a less contrived way to distinguish between local variables and variables captured via closure. **
** e.g., Well, this is a bit too complex I think, but let's say you needed to display the locations sorted by name. Way easier to sort an array of names than to modify an existing string, so have
zones being a variable captured via closure, and then there's a more genuine need for
list. And there is a
sort method which although a bit inefficient in this case could be easily introduced and used. Anyway, something like that, but probably a bit less complicated. Always a bit tough to come up with non-contrived, realistic examples that are simple