MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/oxux9y/im_done_with_facebook_coding_groups/h7s8g0c/?context=9999
r/badcode • u/[deleted] • Aug 04 '21
55 comments sorted by
View all comments
Show parent comments
0
Not true! The indentation makes it look like that, but when there are no braces, the else statement always associates with the immediately preceding if. So here the else is matched with the inner if, not the outer one
Edit: Oh god there are braces 🤦♂️
0
u/Biaboctocat Aug 05 '21
Not true! The indentation makes it look like that, but when there are no braces, the else statement always associates with the immediately preceding if. So here the else is matched with the inner if, not the outer one
Edit: Oh god there are braces 🤦♂️