Welcome to the Treehouse Community
Looking to learn something new?
Nour Abi Nakhoul1,849 Points
Does the variable exist outside of the for loop?
Since the variable in this case is declared inside the for loop, will it also exist outside the loop?
Steven Parker216,000 Points
Variables declared with "var" have function scope, so they would be available outside the loop.
On the other hand, variables declared using "let" or "const" have block scope, so they would not.