Skip to content

Instantly share code, notes, and snippets.

@coleww
Last active August 29, 2015 14:03
Show Gist options
  • Save coleww/2e0a11eabe28a836f497 to your computer and use it in GitHub Desktop.
Save coleww/2e0a11eabe28a836f497 to your computer and use it in GitHub Desktop.
voiding javascript
<h1> no script console </h1>
<h2> can it be haxed? </h2>
<script>
var recursive_void = function (thing){
for(var x in thing){
console.log(x);
console.log("BONK")
if (typeOf(thing[x]) === "Object") {
recursive_void(thing[x])
} else {
thing[x] = void 0;
}
thing = void 0;
thing.__proto = void 0;
thing.prototype = void 0;
}
}
recursive_void(Date);
console.log(".");
recursive_void(NaN);
console.log(".");
recursive_void(Array);
console.log(".");
recursive_void(String);
console.log(".");
recursive_void(Math);
console.log(".");
recursive_void(Number);
console.log(".");
recursive_void(Object);
console.log(".");
recursive_void(Boolean);
console.log(".");
recursive_void(Function);
console.log(".");
recursive_void(RegExp);
console.log(".");
recursive_void(this);
console.log(".");
recursive_void(window);
console.log(".");
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment