Easiest to read? The middle. The way I would write it for my own use is closest to the top, but the easiest to read is the middle.
Always using braces, and giving them their own lines makes nesting as unambiguous as possible and the extra white space reduces density making foreign code easier to digest.
Always using braces, and giving them their own lines makes nesting as unambiguous as possible and the extra white space reduces density making foreign code easier to digest.