Taken from MDN
String literals (denoted by double or single quotes) and strings returned from String calls in a non-constructor context (i.e., witho
In case of string literal we cannot assign properties
var x = "hello" ; x.y = "world"; console.log(x.y); // this will print undefined
Whereas in case of String Object we can assign properties
var x = new String("hello"); x.y = "world"; console.log(x.y); // this will print world