`else if(...) {` supported on its own line, but not `else {`?
See original GitHub issue else if (...) {
// ...
}
else {
// ...
break;
}
I can’t figure out how get rid of 132:9 error Closing curly brace does not appear on the same line as the subsequent block brace-style
, other than wrapping else up to the preceeding }
, unlike all the else-if statements.
Bug, infelicity, or am I missing a config option?
<bountysource-plugin>
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Issue Analytics
- State:
- Created 9 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
if / else errors - learn how to fix these - Codecademy
For one thing, unlike if and else if , an else statement is not used to do condition checking. The purpose of else...
Read more >if statement - c - if + else if + else in one line? - Stack Overflow
C disregards all whitespace characters that aren't required to separate preprocessing tokens. What's this great "virtue" of a doing things in a ...
Read more >If Else Statements - Problem Solving with Python
An else clause is a section of code that runs if the if-statement is False . If the if-statement is True , the...
Read more >if, else, elif :: Learn Python by Nina Zakharenko
An else statement is part of an if statement. If your if statement ran, your else statement will never run. >>> a =...
Read more >C# - if, else if, else Statements - TutorialsTeacher
Multiple else if statements can be used after an if statement. It will only be executed when the if condition evaluates to false....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Always put last else block at end of its previous block like: if(){ } else { }
I think writing this way should solve the issue (put else at the same line as the closing bracket) : if (foo) { alert(“blah”); } else if (!foo) { alert(“second blah”); }