I saw a code fragment like this:
with(document)0[(getElementsByTagName('head') || body).appendChild(createElement(xxx))]
I don't know how to understand
I imagine the author meant something like this:
document.getElementsByTagName('head') || document.body.appendChild(createElement(xxx))
"If there are any
<head> tag in the document, return the first. Otherwise return the the result of appending
createElement(xxx) to the body".