퀴즈 1

Why are "Types" useful and offer an advantage compare to vanilla JavaScript?

Types은 에러를 미리 감지해주고 , 런타임 에러를 피하게 해준다.

Will the following code throw a compilation error? let userName: string; userName = 'Maximilian'; userName = false;

YES

Does this code rely on type inference?

const age: number = 29;

const
let 의 차이는 let 은 type 추론을 하게 해준다.

What's the difference between JavaScript types (e.g. typeof 'Max' => 'string') and TypeScript types (e.g. const name: string = '...')?

TS는 컴파일중 확인되고, JS는 런타임 중 확인된다.