Sure. The whole DHTML shebang is based on self-modifying code, and
that is the basis of a whole lot of AI *and* virus work.
Personally, I think JavaScript has done more to harm the WWW than
anything else... it renders pages basically impossible to edit
(very difficult to edit the "live" page in a WYSIWYG mode), and
renders pages unintelligible to many computer processors.
I like what it does, but hate the way it does it.