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: *REPL environment not required.