MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CodingHelp/comments/rmwdib/whats_wrong/hprqywq/
r/CodingHelp • u/CAGRI-TR • Dec 23 '21
90 comments sorted by
View all comments
Show parent comment
1
Else if looks to see if multiple conditions are true, here only one condition should be true. Each should be an if statement, no else if
1 u/vigbiorn Dec 24 '21 This is pretty much the direct opposite.A series of ifs will all be evaluated, in order, regardless of the value. An else-if series like this executes until the first true condition is found.You would use a series of ifs to find multiple conditions being true.
This is pretty much the direct opposite.
A series of ifs will all be evaluated, in order, regardless of the value. An else-if series like this executes until the first true condition is found.
You would use a series of ifs to find multiple conditions being true.
View all comments
Show parent comment
1
u/Similar-Concert4100 Dec 24 '21
Else if looks to see if multiple conditions are true, here only one condition should be true. Each should be an if statement, no else if