As, I learnt these are the ways of making a string. However , the string made using new keyword give us a object and and array as well.
The output given by string made using new keyword:
String {'ashim kandel'
0: "a" 1:"s" 2: "h" 3:"i" 4:"m" 5: "" 6: "k" 7: "a" 8: "n" 9: "d" 10: "e" 11: "l" length: 12 [[Prototype]]: String [[PrimitiveValue]]: "ashim kandel"
However , the string made with String constructor gives us string .
//here is the code
const strPrim3 = String('ashim kandel'); // Coerced into the string primitive "true"
const strObj = new String('ashim kandel); // String with new returns a string wrapper object.
//please tell me how things are working here