Skip to content

else/else if on newline #91

@rumkin

Description

@rumkin

I prefer to move logic constructions in separated lines:

if (a) {
    // ...
}
else if (a != b) {
   // ...
}
else {
    // ...
}

This makes code more git friendly (like trailing commas). And also it makes it simple to comment else if and else sections. Each block is prepended with it's own condition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions