Worst way to replace words in document

What is the worst, unnecesary and unoptimized way to replace words with other words in a document?

What i got for now is this, but i wanna extend it and make it more unnecesary.

var body = document.getElementsByTagName('html')[0].innerHTML;
var newbody = body.replaceAll("X", "Y");
document.write(newbody);

Why on earth would you want to make your code inefficient? If you really want to make your code terrible I would recommend that you put it though an obfuscation program.

Why would you do that?

4 Likes

…personal reasons :eyes:

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.