Hi everybody. This is my first post, so I apologize if there are any mistakes.
While learning JavaScript in the topic “What is JavaScript?”, “JavaScript running order”, the question arose:
You need to be careful that the objects referenced in your code exist before you try to do stuff to them.
Everything is clear with this, but in the above example, the updateName function is used earlier than it was created (below in the code):
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?