A regular expression is a function
/bar/("bar") === ["bar"]
So typeof /bar/ === "function"
Although only chrome recognises that a regexp literal can be used as a function. Whether this should be so or not is up for grabs. You can treat it just like a function!