1. 布尔类型
let isDone: boolean = true;
let notDone: boolean = false;
2. 数值类型
let decLiteral: number = 6; // 十进制
let hexLiteral: number = 0xf00d; // 十六进制
let binaryLiteral: number = 0b1010; // 二进制
let octalLiteral: number = 0o744; // 八进制
3. 字符串类型
let intro: string = "I'm a coder";
let age: number = 18;
let info: string = intro + ageInfo; // 语句形式
4. 数组形式
let arr1:number[] = [1, 2, 3];
let arr2:Array<number> = [1, 2, 3];