Category "function-expression"

Console output sequence sometimes does not match with the sequence in which they are called

I am new to JavaScript and this is my first question on Stackoverflow, please let me know if I missed something which should be included in the question. Quest

My event handler is executed before the event is fired, why?

I have a pop up window with a button. When I click the button I want something to happen, say an alert. The issue I am having is that the onclick event fires as