var s = 'abc';
function add(a)
{
s =a + 'def';
}
add(s);
console.log(s);
--------------------------------------------
var s = 'abc';
function add(s)
{
s =s + 'def';
}
add(s);
console.log(s);
为什么两个显示的值是不一样的?
...全文
553打赏收藏
高手给看下
var s = 'abc'; function add(a) { s =a + 'def'; } add(s); console.log(s); -------------------------------------------- var s = 'abc'; function add(s) { s =s + 'def'; } add(s); console.log(s); 为什么两个显示的值是不一样的?