function egg(%arg) { if(%arg) { doThing1(); return 5; } else { doThing2(); return -8; }}
also i format the same way as shiftkitty except i put spaces between arithmetic operators and numbers/variables like %a + 2 instead of %a+2 for better visibility
I prefer having the opening bracket be on its own line, but it depends on the languagein javascript you have to put the opening bracket on the same line if you want to return an object due to the handicapped automatic semicolon insertion
example?
var doSomething = function (){ return { "someKey": "hello" };};
if anyone formats their code likeCode: [Select]function egg(%arg) { if(%arg) { doThing1(); return 5; } else { doThing2(); return -8; }}i will find youalso i format the same way as shiftkitty except i put spaces between arithmetic operators and numbers/variables like %a + 2 instead of %a+2 for better visibility