The amount of times I thought test was a prototype of String instead of RegExp and written:
Code:
alert("hi there how are you".test(/hi/))
I can't even nearly count...
Code:
<script type="text/javascript">
String.prototype.test=function(reg){if("test" in reg)return reg.test(this);return null;}

alert("hi there how are you".test(/hi/))
alert(/hi/.test("hi there how are you"))

alert("hi there how are you".test(/bye/))
alert(/bye/.test("hi there how are you"))
</script>