In IE<9, .toStringing (function (x) {return x*x;}) gives
"(function (x) {return x*x;})"
While in chrome it gives:
"function (x) {return x*x;}"
If you compare:
"function (x) {return x*x;}" > "1,2,3" // true
"(function (x) {return x*x;})" > "1,2,3" // false
Which is effectively the same as comparing:
"f" > "1"
"(" > "1"
Which is the same as comparing:
102 > 49
40 > 49
So that’s how we get from a function and array comparison to a simple number comparison 🙂