In Java/C/C++ (and, with the exception of Python, every other language I can think of) whitespace is ignored.
I've just spent several hours trying to work out why I was getting an error on a return statement. The answer was whitespace.
So here are the two code snippets that I thought were functionally equivalent.
return { a:b, c:d};
return
{
a:b,
c:d
};
But I now understand that the first one works but the second one throws an error on the c:d line.
Can someone explain why these are not syntactically equivalent?