What's the difference between these? Will event loop be formed after the page load got finished ?
They are so different that it isn't really worth comparing them.
Binding an event handler to the load event will call that function when:
Passing a function to setTimeout with a time of 0 will call that function when:
setTimeout in the first place