Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
PudgePacket
· 7y ago · 0 comments
It helps reduce uninitialised variables, and if the condition is false, you don't have an extra variable hanging around in the scope that could potentially be misused by the developer later.
Comments
[–]
jlokier
7y ago
You seem to have missed the point of the comment you're replying to, which already acknowledges that scope-limiting is a good thing to do.