各位大佬请看下var base_number = 1;
var base_string = "str";
var base_boolean = false;
function baseprint(prefix,base){
document.write(prefix+base+"</br>");
base_number = 2;
base_string = "str_new";
base_boolean = true;
}
document.write("原始数据类型打印<hr>");
baseprint("数值型:",base_number);
baseprint("字符串类型:",base_string);
baseprint("布尔型:",base_boolean);为啥上面的代码打印出来的结果是这样啊:
添加回答
举报
0/150
提交
取消