https://objectcomputing.com/files/2815/7237/9988/1911-sett-img01.png

타입 선언

Boolean

let isBoolean: boolean;
let isBone: boolean = false;

숫자: Number

let num: number;
let integer: number = 6;
let float: number = 3.14;
let hex: number = 0xf00d; //61453
let binary: number = 0b1010; // 10
let octal: number = 0o744; // 484
let infinity: number = Infinity;
let nan: number = NaN;

문자열: String

let str: string;
let red: string = 'red';
let grenn: sttring = 'green';
let myColor: string = 'my color is ${red}';
let yourColor: string = 'Your color is' + green;

배열: Array