I recently got this in a library called WebApp.net:
var $h = {
get HEAD() { return 0 },
get BACK() { return 1 },
get HOME() { return 2 },
get LEFT() { return 3 },
get RIGHT() { return 4 },
get TITLE() { return 5 }
};
var $d = {
get L2R() { return +1 },
get R2L() { return -1 }
};
I am familiar with JS, but that seems pointless. Chrome interprets this as an Object with $ h.HEAD, and the rest as numbers that appear after the return. In addition, something like getters is also part of $ h.
Can someone give me more info about this? IE cannot interpret this, so I have to do the equivalent of this.
source
share