Is it recommended to use the same variable name in inner scopes?


#1

Question

Is it recommended to use the same variable name in inner scopes?

Answer

If you can avoid it that would be helpful because there’d be less confusion, but if you’re not using the outer scoped variable and it just makes sense to use the same name then go for it.