94 bytes to quickly get a var type

I surpassed myself for the third time but I tweeted too much about, so here a quick one ;)

// was getClassName but people prefer type
// while kangax prefers var
var type=(function(s,u){return function(o){return o==u?""+o:s.call(o).slice(8,-1)}})({}.toString);

Comments

Popular posts from this blog

JSON __sleep, __wakeup, serialize and unserialize

HEAVY HEADS

Resurrecting The With Statement