Why doesn't JavaScript need a main() function?
<p>Many programming languages require a special user-written function that marks the begin
of the execution. For example, in C this function must always have the name <code>main()</code>. In
JavaScript, however, such a function is not required.</p>

<p>What are the logical reason for the absence of such a dedicated top level function in JavaScript? I know this is some kind of theoretical question, but I cannot find an answer online.</p>
