• 9point6@lemmy.world
    link
    fedilink
    arrow-up
    54
    ·
    9 months ago

    Hmm, I think the condition gets newlined and you K&R on the closing parenthesis IMO:

    while (
        isSomething 
        && isSomethingElse
        && nFoo < 10
    ) {
        blah();
        blah();
    }
    

    You could also keep isSomething on the first line too, but I think it’s nice to keep the whole multiline condition at the same indent width