Any nesting level in JavaScript

There may be also such function calls: func()()() and func()()() - and so on ad infinitum.

To do this, you need the inner function to also return a function, that one - another one, and so on. Here is an example:

javascriptfunction func() {
  return function() {
    return function() {
      return '!';
    };
  };
}

console.log( func()()() ); // shows '!'
Задание 1

Make the function func that, when called like this: func()()()()(), will return '!'.