Consider:
var myString = new String("Hello world");
alert(myString.noSuchValue); // undefined
alert(myshit); // This results in error, and not the above one
Both of them, i.e.
noSuchValue on object myString, myshitare undefined.
But why do I get an error for myshit and not for the object property case?

You can obtain the proper answer from the ECMAScript specs, but I'll summarize it in the following example:
var data= myObj.prop1;
The expected behavior is:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With