Q:

removeEventListener - callback within function definition itself? 

I have the following code where I add an event listener to the document and then remove it. 
document.addEventListener("keypress", gameStart);

function gameStart() {
    document.querySelector("h1").innerHTML = "Level 1";
    document.querySelector("h2").style.visibility = "hidden";
    document.removeEventListener("keypress", gameStart);
}

I cannot wrap my head around how I can have a callback to gameStart in the removeEventListener method inside the definition of gameStart() itself.  This seems circular to me, but I sense I am misunderstanding something fundamental here.  What am I missing? 

A:

In the removeEventListener documentation we can see:

target.removeEventListener(type, listener[, options]);
target.removeEventListener(type, listener[, useCapture]);

...
listener
   The EventListener function of the event handler to remove from the event target. 

the EventListener function (in your case gameStart) is not called when calling removeEventListener, therefore there is not any circular calling or recursion, it is passed to removeEventListener so this function can be unregistered from that event. 

A:

Variables used inside a function are not evaluated until the function is called. 
gameStart can, therefore, reference itself because it is created before it can be called. 

A:

You can always pass the reference of the function that you're defining because

A function doesn't have to have everything available at the time of definition, rather that's a requirement at the time of calling. 

It's also fundamental to recursion.  e.g.
function getFactorial(num) {
    if (num <= 2) {
        return num;
    }
    return num * getFactorial(num - 1);
}

Maybe, the following will help you understand more:
function getType() {
    return typeof getType;
}

Above function will always return "function". 
How about another one:
function getTypeOfX() {
    return typeof myObj.x;
}

You'll be able to define this function but as soon as you call it using getTypeOfX(), you'll get an error because myObj is not defined in the outer / global scope of the function definition. 
If you're trying that out in console.  You can do 
var myObj = {
    x: ""
}

even after the function definition, and call getTypeOfX() again to see that it now prints "string". 
The conclusion here is what @Quentin mentioned:

Variables used inside a function are not evaluated until the function is called.