Archives for May 2010

when typeof string != string

Curious javascript sample. Consider the following code: var s = “asd” var f = function() { return typeof(this) } An expression typeof(s) returns “string” (as it is expected), but f.call(s) returns “object”! To make matters worse consider the following snippet: var s = “asd” var f = function() { return this instanceof String } An [...]

Uprising agains blogs

Full post is here.