Using the Chrome console I used the following code (valid):
function foo()
{
return {
prop: "some value"
};
}
When changed, the syntax style is no longer valid ( {
played to next line):
function foo()
{
return
{
prop: "some value"
};
}
Is this a JavaScript syntax rule or a bug implementation of browsers? I tested this on Internet Explorer too (same behavior).