// 布尔类型
let isDone: boolean = false;
// number类型
let age: number = 10;
// string类型
let firstName: string = "Felix";
let fullName: string = `${firstName} Chan`;
// undefined类型
let u: undefined = undefined;
// null类型
let n: null = null;
isDone = undefined;
age = undefined;
firstName = undefined;
fullName = undefined;
u = undefined;
n = undefined;
console.log(isDone);
console.log(age);
console.log(firstName);
console.log(fullName);
console.log(u);
console.log(n);
isDone = null;
age = null;
firstName = null;
fullName = null;
u = null;
n = null;
console.log(isDone);
console.log(age);
console.log(firstName);
console.log(fullName);
console.log(u);
console.log(n);
// 任意类型, 不做任何校验
let noSure: any = 4;
noSure = true;
noSure.myName;
noSure.getName();
undefined和null是任意数据类型的子类, 任意类型都可以赋值为undefined和null