I'm most familiar with Python and somewhat with C, and when I see this syntax in JS it really confuses me
function begin () {
console.log("done did it");
}
window.onload = begin(); // the same output as
window.onload = begin; // this one
In Python, one would be passing the return value of the function, the other a pointer to the function. What are the semantics in JS for these two statements?