
ํด๋์ค์ ์ธ์คํด์ค โ๏ธ ํด๋์ค ํด๋์ค๋? ํด๋์ค๋ ์์ฑ๊ณผ ๋ฉ์๋๋ฅผ ์ ์ํ๋ ๊ณต๊ฐ์ด๋ค. ์์ฑ์ ํด๋์ค์ ํฌํจ๋๋ ๋ณ์๋ฅผ ์๋ฏธํ๊ณ , ๋ฉ์๋๋ ํด๋์ค์ ํฌํจ๋๋ ํจ์๋ฅผ ์๋ฏธํ๋ค. ํด๋์ค๋ฅผ ์ ์ํ๋ ๋ฐ์๋ 2๊ฐ์ง ๋ฐฉ๋ฒ์ด ์๋ค. ํจ์๋ก ์ ์ (ES5 ๋ฌธ๋ฒ) function Introduce(name, age, favorite) { // ์ธ์คํด์ค ๋ง๋ค์ด์ง ๋ ์คํ๋๋ ์ฝ๋ } class ํค์๋๋ก ์ ์ (ES6 ๋ฌธ๋ฒ) class Introduce { constructor(name, age, favorite) { // ์ธ์คํด์ค๊ฐ ๋ง๋ค์ด์ง ๋ ์คํ๋๋ ์ฝ๋ } } ์ฌ๊ธฐ์ constructor๋ ํด๋์ค๊ฐ ์ธ์คํด์ค ๊ฐ์ฒด๋ฅผ ์์ฑํ ๋ ๊ฐ์ฒด๋ฅผ ์ด๊ธฐํํ๋ ๋ฉ์๋์ด๋ค. constructor ๋ฉ์๋๋ฅผ ๋ค์๊ณผ ๊ฐ์ด ์ฌ์ฉํ๋ค๋ฉด, cla..

์์ ์๋ฃํ๊ณผ ์ฐธ์กฐ ์๋ฃํ โ๏ธ ์์ ์๋ฃํ ์์ ์๋ฃํ์ด๋? ๊ฐ์ฒด๊ฐ ์๋๋ฉด์ method๋ฅผ ๊ฐ์ง์ง ์๋ ์๋ฃํ์ผ๋ก ๋ณ์์ ํ๋์ ๋ฐ์ดํฐ๋ง ์ ์ฅํ ์ ์๊ณ ํด๋น ๋ฐ์ดํฐ๋ ๊ฐ ์์ฒด์ด๋ค. ์์ ์๋ฃํ ์ข ๋ฅ 6๊ฐ์ง string, number, bigint, boolean, undefined, symbol, (null) "hello world!" "hello september!" // "hello world"์ "hello september!"์ ๋ชจ๋ ๋ณ๊ฒฝํ ์ ์๋ ๊ณ ์ ๋ ๊ฐ์ด๋ค. let word = "hello world!" word = "hello september!" // word๋ผ๋ ๋ณ์์ ์ฌํ ๋น์ ํ์ฌ ๋ณ์์ ๋ด๊ธด ๋ด์ฉ์ ๋ณ๊ฒฝํ๋ ๊ฒ์ ๊ฐ๋ฅํ๋ค. โ๏ธ ์ฐธ์กฐ ์๋ฃํ ์ฐธ์กฐ ์๋ฃํ์ด๋? ์์ ์๋ฃํ์ด ์๋..