Trying to outline curly braces at the end of the line can save you some headaches in case a semicolon is forgotten somewhere in the code.
The statement is misleading and even incorrect(the problem unrelated to forgotten semicolon).
An Expression in a return or throw statement should start on the same line as the return or throw token. A postfix ++ or — operator should appear on the same line as its operand. A Identifier in a break or continue statement should be on the same line as the break or continue token.
The restriction above can be avoided by the following coding recommendation.
In return and throw statement use only simple variables and keep them on the same line as the statement:
var ret =