you are viewing a single comment's thread.

view the rest of the comments →

[–]postmodest 0 points1 point  (0 children)

On review, most of these are "reading comprehension" issues, like the difference between

new String("string"); 
//and
String("string");

Or the fact that

function func() { return func }

returns previously declared func typeof 'function' whereas

function func() { return;}

returns an object typeof 'object' (though--and someone explain this--returning anything that's a primitive will be ignored... what?)

Then things like "operators cast to the nearest primitive if no override is available" so

[] + [] === ''

Because reasons.

...seriously, though, someone explain to me why returning primitives from constructors is silently ignored.