That doesn’t help people who stumble upon this when searching for the problem. All the “look it up” response does is make sure the search results are a bunch of content saying “look it up”, which isn’t really that helpful.
This used to be done quite a lot in the early JS days when scope was kind of thrown out the window (no pun) and you just did whatever dirty thing you needed to in order to make a page work.
lol, I just searched "problem with referencing named element ids as javascript globals": the first result is the linked article and the second result is, you guessed it, this thread with your comment on top.