let a:boolean = true; //格式: let 变量名:类型 = 赋值; // let a 不能重复声明 a = false; let b; // 当直接声明变量名时候 此时类型相当于 隐式any (任意类型) b =12; b = '12'; b = false; let c = 1; c = '12'; // 当声明类型后 再次赋值其他类型 会产生报错 仍会成功编译 console.log(c); export {};