In JavaScript, from my understanding, the below are all same:
var carter2 = new String(); var carter2 = \'\'; var carter2 = \"\";
Which one is
While '' and "" are the same (they are primitives), new String() is not because it returns a String object.
''
""
new String()
String
typeof '' == 'string' typeof "" == 'string' typeof new String() == 'object'
See Distinction between string primitives and String objects.