I’m just at the beginning of my JavaScript learning and don’t want to misunderstand the basics.
I suspect that this is a feature of the function or .addEventListener, but I’m not sure. Can someone please explain this for me in detail?
This is a really good question, and has to do with how JS code is parsed by the browser. It is fair to say that generally it runs instructions from top to bottom, in order, but this is not always true of everything.
Thank you very much for the detailed answer and helpful links. I just don’t know if this point will be explained further in the lessons (I think yes, but nevertheless), and it will eat me.
Thanks again and have a nice day.