This is a tangent from this post, but is there some rule that we can’t use let or const declarations in the problem sets until they’re introduced, or are the problem sets just showing their age? With regards to the Stand In Line problem in the linked post, if the testArr weren’t being declared with var then it wouldn’t even be possible to reference inside the function definition.
I understand it would be a quite an undertaking at this point, but I agree with what you said the other day that ES6 is not special in 2021, and really think it would be reasonable to go through and change all of the instances of var in the curriculum.
You can test this in the challenge itself. Change it to let or const and then do a console.log(testArr) in the function.
But I agree with your overall argument, in an ideal world it would be a good idea to get rid of var in all of these challenges. I’m not an authority on this but I believe that they are concentrating on the next version of FCC right now and thus don’t want to spend the time to go back and fix this with the limited resources they have.