SOURCE

var x = 1;
x = 2;
console.log(x);//2;-----var声明的是变量,可被赋值替换
 
const y = 1;
y = 2;
console.log(y);//Assignment to constant variable.;------const声明的是常量,不可改变
console 命令行工具 X clear

                    
>
console