r/learnjavascript • • Jun 07 '22

this coding stuff easy fr

Post image
149 Upvotes

71 comments sorted by

View all comments

14

u/ManiacsThriftJewels Jun 07 '22

All js should start with the declaration:

document.write = () => throw 'Bad dog. No biscuit.'

1

u/caligula7944 Jun 07 '22

i have no idea what this means lmao

9

u/LostErrorCode404 Jun 07 '22

It changes the source code for document.write to instead throw a error, stopping the program.

Terrible practice to mess with prototypes and default functions, but funny for the meme.

1

u/ManiacsThriftJewels Jun 07 '22

Is it worse than actually using the method it replaces though?