function bar() {console.log('foo'); return 'foo';} function foo() {console.log('bar'); return 'bar';} var x = (bar(), foo()); alert(x);