[].reverseis a feature that works on this.
For example, when called as [1,2].reverse(), it thisis an array [1,2], and it returns [2,1].
However, if you just call f(), you call the function without context. In the browser, this means that the default context is transmitted window(if you are not in strict mode), and on the server you get an error message, basically saying that it thisis undefined.
Try f.call([1,2])