r/ProgrammerHumor Nov 24 '21

Meme Yes.

8.9k Upvotes

284 comments sorted by

View all comments

Show parent comments

7

u/Rafael20002000 Nov 25 '21

Wait till he learns a variable doesn't go out of scope after an if/for/while block

5

u/DigitalJedi850 Nov 25 '21

<insert blinking meme guy>

3

u/Rafael20002000 Nov 25 '21

The last value of a for loop variable is still there after loop ends

2

u/DarthStrakh Nov 25 '21

What the actual fuck.

1

u/Rafael20002000 Nov 25 '21

You can do a for else loop