/*
*(REFER TO P151)
*@time 2008-11-25
*/
//No return value
function Test0(){
this.name='test0';
}
var test0=new Test0;
//debugger;
alert(test0);//output [Object]
alert(test0.name);//output test0
//return one character String object
function Test(){
this.name='test';
return new String('123');// Return string object
}
var test=new Test();
alert(test);//Output 123
alert(test.name);//Output undefined, indicating that the object created by the constructor is a string object
//return a primitive Type string
function Test2(){
this.name='test2';
return '123';// Return string object
}
var test2=new Test2() ;
alert(test2);//Output [Object]
alert(test2.name);//Output test0