javascript函数内设置传入参数对象导致函数外的实参被修改
javascript函数内设置传入参数对象导致函数外的实参被修改问题代码如下var time=new Date();console.log(time.getDate());function set(Time) { Time.setDate(1);}set(time);console.log(time.getDate());我使用node.js运行结果如下:原对象
原创
2017-08-03 10:16:49 ·
1648 阅读 ·
0 评论