타입의 종류
String (문자열) const str: string = 'Hello'; Number (숫자) const num: number = 2; const pi: number = 3.14; const infi: number = Infinity; const nan: number = NaN; Boolean (true, false) const isDone: boolean = false; Array (배열) // 두 가지 방법 const fruits: string[] = ['Apple', 'Banana', 'Orange']; const fruits: Array = ['Apple', 'Banana', 'Orange']; // 유니언 타입 const array: (string | number)[] = ['Apple', 1..
2022.12.23