If I had a complex if statement that I did not want to overflow simply for aesthetic purposes, what would be the most kosher way to break it up since coffeescript will interpret returns as the body of the statement in this case?
if (foo is bar.data.stuff and foo isnt bar.data.otherstuff) or (not foo and not bar)
awesome sauce
else lame sauce
CoffeeScript will not interpret the next line as the body of the statement if the line ends with an operator, so this is ok:
it compiles to
so your
ifcould be formatted asor any other line-breaking scheme so long as the lines end in
andorororisor==ornotor some such operatorAs to indentation, you can indent the non-first lines of your
ifso long as the body is even more indented:What you cannot do is this: