The semicolon is a delimiter between statements. There is no limit to the amount of code you can include in that event call (although it is really bad practice to go too far).
It is neater (more DRY) to call JS files rather than cramming a lot of code in the HTML file (Separation of Concerns).
Aren’t the current Best Practices in JS to register event handlers outside these inline tags?
Yes they are. @asasass is a person that has been resistant against all efforts to improve. Instead he wants to employ the fewest characters, and insists on inlining everything for reasons of pure execution speed.
@asasass - Please correct me if I have misunderstood these characteristics about you in any way.
Why? If you are not going to do it properly in a separate file then using multiple getElementById calls is the simplest way to code it when you are jumbling it with your HTML anyway.
English may not be his first language. What he wanted can be interpreted from “How would I add currentTime to The 1st code.” but can be expressed much more clearly, as indeed occurred later.
He was asked that elsewhere and says that it is. He’s also been pointed to resources on how to ask clear questions, so I’m not sure how else we can help in that respect.