When you try to use one of these literals as an object, the literal is converted to an object (a wrapper is applied to it) inside, so you get access to any method or property that you are trying to use:
var a = /regexp/
a.test(aString);
... essentially the same as:
var a = new RegExp("regexp");
a.test(aString);
The only difference is that without the eval()only way to create Regex at run time is to use RegExp().
The same goes for the lines:
var b = "abc";
b.length;
... - , :
var b = new String("abc");
b.length;
typeof "ABC" typeof (new String("ABC")). "string", "". (. ).
. new String("ABC");" "ABC", "ABC". , "ABC": . Regexes , .
"ABC" ( , , ..)