Do I need to declare my variables inside a for loop?

I coundn’t pass the first test just simply because I didn’t initilize (i) with a let expression and the funny thing about it is that my code ran flawlessly but the test kept asking me if I’ve had used a for loop.

Can someone tell me if defining variables in loops must come with a keyword expression or not?
Thanks you very much.

Must? No. Should? Yes. When you declare a variable without using var, const or let, JavaScript considers it an undeclared global variable. Do you really want to give global scope to a simple index variable in a for loop? You can if you want, but that practice could lead to problems with large complex projects.
See this for more information: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_Types#Declaring_variables