js中const常量变量赋值(Assignment to constant variable)
let a = 1; const b = 1; a = 2; b = 2; console.log(a,b); //使用const命名 重新赋值会报错(常量变量赋值) 因为const命名为常量//定义一个对象时 let obj = { user:'1', name:'2' }; const obj2 = { user:'3', name:'4' }; obj2.name = 5; obj = 6; console...
原创
2021-01-07 14:31:00 ·
3933 阅读 ·
0 评论