I’m learning the functions reusable blocks of code article and i read this note, i think these lines also included in this note, variables declare with let and const follow the same scoping rules in loops and if block but variables declare with var do not follow the same scoping rules in loops and if block.
hello @Junaid_Arshad
could you explain further your point and thanks
I mean that loops, conditional blocks also follow same scoping rules if we declare variables with let and const, so i think this line also included in note.
could you give me the link to page that include that note so i can get what you mean and thanks
i think it mean that the variable defined in the for () part would still seen in the {} body
same thing for the if
and have a nice day