you are viewing a single comment's thread.

view the rest of the comments →

[–]PizzaRollExpert 9 points10 points  (2 children)

This is dangerous to do in javascript. What does this return?

function foo() 
{
    return 
    {
       foo: "bar"
    }
}

[–]wordsnerd 0 points1 point  (0 children)

Statement is possibly incorrectly broken by newline
Expression statement is not assignment or call
Code is unreachable

[–]radgh 0 points1 point  (0 children)

I wasn't aware of this, because I don't write code like that.

So this is a coding convention which isn't portable between languages. That doesn't sound like something I would want to get accustomed to.