js题

function newStr(){
return "hi";
}
function turn(str){
str.toString = newStr;
}
var str1 = "hello", str2 = new String("hello2");
turn(str1);
turn(str2);
alert(str1);
alert(str2);
alert(str1+str2);
posted @ 2013-10-09 18:22  lily white  阅读(156)  评论(0编辑  收藏  举报