omitting function parentheses when passing as function as an argument
===

I am trying to wrap my head around as to why the following code results in a stack overflow when the parentheses are included, but do not when they omitted. 

I am calling the function itself as an argument to setTimeout and it works without parantheses, but of course fails when I add them. It was my intuition to add the () after the function. Just hope somebody can clear this up for me. When are parans optional and not?

CASE 1:

    var a = 1;
    
    function foo() {
        a++;
        document.write(a);
        setTimeout(foo(), 2000)
    }​ 
    // RangeError: Maximum call stack size exceeded

   CASE 2:

    var a = 1;
    
    function foo() {
        a++;
        document.write(a);
        setTimeout(foo, 2000)
    }​
    // parans are omitted on foo function and it works. 