JavaScript/JXA doesn't care about whitespace in lines, right? For example, you can place a "{" at the end of a line, or at the start of a new line, right?
Try running this:
function test1() {
return "test1";
}
function test2() {
return
"test2";
}
console.log("Result of test1: '" + test1() + "'");
console.log("Result of test2: '" + test2() + "'");
If you're running this from Script Editor, you'll need to select the "Messages" tab at the bottom.