Immediately invoked function call parameters in JavaScript

Let our function, which we are going to call in-place, take a string for output as a parameter:

function(str) { console.log(str); }

Let's call our function in-place, passing it a string to output to the console:

(function(str) { console.log(str); // shows '!!!' })('!!!');

Determine what will be output to the console without running the code:

(function(num1, num2) { console.log(num1 + num2); })(1, 2);
enru