标签:ref 使用 ant const typeerror 不可变 err reference 不可用
console.log(a); // undefined
var a = 1;
console.log(b); //function b(){}
function b(){};
var b;
console.log(a) // Uncaught ReferenceError: a is not defined
let a;
const a = 1;
a = 2;// Uncaught TypeError: Assignment to constant variable.
const obj = {age: 10}
obj.age = 20;
console.log(obj.age);// 20
标签:ref 使用 ant const typeerror 不可变 err reference 不可用
原文地址:https://www.cnblogs.com/jhaosun/p/var.html