โช Literal types const userName1 = "Bob"; let userName2 = "Tom"; const๋ ์์๋ก ๋ณํ์ง ์๋ ๊ฐ์ ์ ์ธํ ๋, let๋ ์ฌํ ๋น์ด ๊ฐ๋ฅํ ๊ฐ์ ์ ์ธํ ๋ ์ฌ์ฉํฉ๋๋ค. ์ ์ํ์์ VSC๊ฐ์ ์๋ํฐ์์ ๋ง์ฐ์ค๋ฅผ ์ฌ๋ ค๋ณด๋ฉด const๋ "Bob"์ด๋ผ๊ณ ์ ์ธ ๋ ๊ฐ์ด ๋จ๊ณ , let์ let userName2 : string์ด๋ผ๋ ํ์
๊ฐ์ด ๋น๋๋ค. let์ ์ธ์ ๋ ๋ค๋ฅธ ๊ฐ์ผ๋ก ๋ณํ ์ ์๊ธฐ ๋๋ฌธ์
๋๋ค. userName2 ์ ์ซ์๋ฅผ ๋ฃ๊ณ ์ถ๋ค๋ฉด? let userName2 : string | number = "Tom"; ์ด๋ ๊ฒ ํ์
์ ๋ ๋ค ๋ช
์ํด์ค๋๋ค. type Job = "police" | "developer" | "teacher"; interface User..