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:

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

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

javascript(function(str) {
  console.log(str); // shows '!!!'
})('!!!');
Задание 1

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

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