I have just noticed that when an undeclared variable has been called, JS is looking for the DOM element with such ID. Here's the example:
Let's say I have an HTML doc with the only content:
<div id="block"></div>
<script>console.log(block)</script>
And when I open the page and check the console, I will see the following:
Though block
hasn't been declared,it still has value. I never seen this before. I googled it but couldn't find anything. Is there a name for it and if possible, can someone drop caniuse page for that? Thanks everyone!