[Language/Typescript] ํด๋์ค
์ ์ : ๊ฐ์ ์งํฅ ํ๋ก๊ทธ๋๋ฐ์ ํต์ฌ ๊ตฌ์ฑ ์์ ์ค ํ๋๋ก ๊ฐ์ฒด๋ฅผ ๋ง๋ค๊ธฐ ์ํ ํ์ด๋ค. ๊ตฌ์ฑ์์ ์์ฑ(attribute): ๊ฐ์ฒด์ ์ฑ์ง ๊ฒฐ์ ๋งค์๋(method): ๊ฐ์ฒด์ ์ฑ์ง์ ๋ณํ์ํค๊ฑฐ๋ ๊ฐ์ฒด์์ ์ ๊ณตํ๋ ๊ธฐ๋ฅ๋ค ์ฌ์ฉ ๊ฐ์ฒด: ํด๋์ค๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์์ฑ, instance๋ผ๊ณ ๋ ํจ ์ ์ class ํค์๋๋ก ์ ์ํจ method, attirbute ์ ์ ํ, new ํค์๋๋ก ๊ฐ์ฒด ์์ฑ๊ฐ๋ฅ class Preson { name: string; age: number; constructor(name: stirng, age: number) { this.name = name; this.age = age; } const person = new Person('Spartan', 30); person.sayHell..
2023.07.27