Here, I have two functions exactly the same
1)
  function al() {
    return 
    {   
        bar: "hello"
    };
}
console.log(al())
While running this on node this is printing, undefined
While the same code, with diff bracket level, return the output
2)
function al() {
    return {   
        bar: "hello"
    };
}
console.log(al())
Please run on node.
Version 10.x
 
    