Node.js REPL—this looks like an immediately-invoked function declaration: > function dummy(x) { console.log(x) }('abc') 'abc' > dummy [Function: dummy] What’s really going on? Answer:https://github.com/rauschma/impatient-js/issues/49 …
That's not what's happening. The function isn't being called. The value is just being returned after dummy is created. You can change the log to `console.log('arg', x)` too see this.