This is an alternative way to deliver a string primitive version of a String object's value. In this case, it is formatted as a string literal and can then be used in an eval() function to assign another string.
If you run the example below, it should yield this as a result:
The result of calling this method is a string version of the String object formatted as a string literal.
// Create a number and then examine its source myString = new String("ABCDEF"); document.write(myString.toSource());