Is there a difference? Will string 2 inherit different object prototypes?
var s1 = 1234 + \'\'; var s2 = String(1234); //s1.someNewFunc(); error? //s2.someNew
Javascript allows you to treat primitive values as though they were objects. It does so by doing an on-the-fly coercion of the primitive to an object. That's why, even though primitives have no properties, something like this is perfectly fine:
"abcde".substr(1,3); //bcd true.valueOf(); //true