JavaScript code is executed during the page loading the page loading or when the browser fires an event. All statements are executed at page loading and some statements just define functions that can be called latter.
What is Runtime?
Run time describes software/instructions that are executed while your program is running, especially those instructions that you did not write explicitly, but are necessary for the proper execution of your code.