Today I stumbled upon the possibility to access a DOM element in Javascript simply by its id e.g. like this:
elementid.style.backgroundColor = \"blue\"
It’s not a part of any standard. Besides, simple variables can be overwriten. Var content
could be redeclared in any place of your script, or external library (and, yes, I know global variables are evil, but ppl still use them…) and your script will break.
And, naturally, you cannot use IDs like alert
or document
etc.