Skip to main content
13 of 18
added 6 characters in body
Downgoat
  • 29.1k
  • 6
  • 84
  • 155

JavaScript Shell

This will make the language completely unusable.

clear(this);

Isn't it nice how JavaScript has such a nice function to destroy itself?


This is pretty simple, the clear function completely empty an object. this refers to the global object so clearing out this, clears out the global object which is everything including constructors, functions, constants, and built-ins.


Because this clears everything, doing anything, even defining a literal will throw an error, making the language completely useless: Example Usage *REPL environment not required.

Downgoat
  • 29.1k
  • 6
  • 84
  • 155