One of my favourite ways to punish JavaScript developers who don't use `var` is to randomly hide a
if (false) {
var GLOBALVAR;
}
somewhere in the code.
It's fun (in a harmless fun kinda way, but you can also use some really dirty tricks to really hamper someone's work) to fuck up people's code - that's why I wrote Underhanded JavaScript. :P
EDIT:
Another fun one is to add `return`s to constructor functions.
It's fun (in a harmless fun kinda way, but you can also use some really dirty tricks to really hamper someone's work) to fuck up people's code - that's why I wrote Underhanded JavaScript. :P
EDIT:
Another fun one is to add `return`s to constructor functions.