I'm discovered this behavior in the following example:
console.log(myId);
// What I expected:
// Uncaught ReferenceError: …
// Result (chrome 78 windows 10):
// <div id="myId">…</div>
<div id="myId">
Is this behavior normal/expected? Should it be used/avoided? From my testing it seems to work on chrome, firefox and edge, but not on safari mobile. I couldn't find anything about this behavior and never saw it used, and the devtools (and code editors) doesn't autocomplete it like most other variables, it's really odd.