-
[JS] this ํค์๋ : ์ด๊ฒ ๋ญ์์?Web Programming/JavaScript 2025. 5. 31. 19:58
๐ ์๋ก์ด ๋์ ์ ๋ํ ์๋ก์ด ๋ง์๊ฐ์ง
๋ค์ ํ ๋ฒ ์ทจ์ค์ ํฐ๋ ํฌ์ธํธ๊ฐ ๋๊ธฐ๋ฅผ ๋ฐ๋ผ๋ ์๊ฐ์ผ๋ก ๋ฉ์์ด์ฌ์์ฒ๋ผ์ ํ๋ก ํธ์๋ ๋ถํธ์บ ํ ํ๋ฌ์ค 5๊ธฐ์ ์ง์์ ํด์ ํฉ๊ฒฉํ๋ค.
๊ฐ๊ฐ๊น์ง๋ ์๊ฐ์ด ์ข ๋จ์์ง๋ง ๊ฐ๊ฐ ์ ๊น์ง ์ด๊ฒ์ ๊ฒ ๊ธฐ์ด์ ์ธ ๊ฒ๋ค์ ๋ค์ ๋ค์ ธ๋๊ณ ์ ํด์ ์ํค๋ถ์ค์ '๋ชจ๋ ์๋ฐ์คํฌ๋ฆฝํธ Deep Dive'์ ํ๋น ๋ฏธ๋์ด์ '๋ชจ๋ ์๋ฐ์คํฌ๋ฆฝํธ ํต์ฌ ๊ฐ์ด๋'๋ฅผ ์ค๊ฐ๋ฉฐ ์ฝ์ด๋ณด๊ณ ์๋ค.
๊ณต๋ถ๋ฅผ ํ๋ ์์๋ ๋ฑํ ์๋ค.
๊ทธ๋ฅ ๋ชฉ์ฐจ๋ฅผ ๋ณด๋ค๊ฐ ์ฌ๋์๊ฒ ๋ฐ๋ผ๋ณด๊ณ ์ถ์ ๊ณณ์ ํผ์ณ์ ๊ณต๋ถํ๋ค.
๊ทธ ์ด์ ์ ํํธ๋ฅผ ๊ณต๋ถํด์ผ ํ ํ์๊ฐ ์๋ค๋ฉด ๊ทธ๊ฒ์ ์ ์ ๊ธฐ์ ๋ถ์ฑ๋ก ๋จ๊ฒจ๋๊ณ , ์ดํดํ ์ ์๋ ๋ถ๋ถ๊น์ง๋ง ๊ณต๋ถ๋ฅผ ํ ๋ค์
๊ธฐ์ ๋ถ์ฑ๋ ์ฐจ์ฐจ ํด๊ฒฐํด๋๊ฐ ์๊ฐ์ด๋ค. ์ด๋ ๊ฒ ์ฐ์์ ์ผ๋ก ๊ณต๋ถ๋ฅผ ํด๋ณด์๋ ์ฌ์ฐ(?)
์ฐ์ ์ค๋ ์ฒซ ๋ฒ์งธ๋ก ์จ๋ด๋ ค๊ฐ ๋ณผ TIL์ this ํค์๋๋ค.
๊ทธ๋ฆฌ๊ณ ๋ ๋์๊ฐ this ๋ฐ์ธ๋ฉ์ ๋ํ ์ด์ผ๊ธฐ๋ฅผ ์ข ํด๋ณผ๊น ํ๋ค.
๐ this ํค์๋, ์ด๊ฒ ๋ญ์์?
๊ฐ์ฒด์งํฅ ํ๋ก๊ทธ๋๋ฐ์์ ๊ฐ์ฒด๋ ์ํ๋ฅผ ๋ํ๋ด๋ 'ํ๋กํผํฐ'์ ๋์์ ๋ํ๋ด๋ '๋ฉ์๋'๋ฅผ ํ๋์ ๋ ผ๋ฆฌ์ ์ธ ๋จ์๋ก ๋ฌถ์ ์๋ฃ๊ตฌ์กฐ๋ค.
๊ทธ๋ฆฌ๊ณ ์๋น ๋ฉ์๋๋ ์์ ์ด ์ํ ๊ฐ์ฒด์ ํ๋กํผํฐ๋ฅผ ์ฐธ์กฐํ๊ณ ๋ ๋ณ๊ฒฝํ ์ ์์ด์ผ ํ๋ค. ๊ทธ๋ ์ง ๋ชปํ๋ฉด ๋ฉ์๋๊ฐ ๊ฐ์ฒด์ ๋ฌถ์ฌ์์ ์ด์ ๊ฐ ์์ง.
์ฉ, ๊ทธ๋์ ์ด์จ๋ ๊ฐ์ฒด์ ํฌํจ๋์ด ์๋ ๋ฉ์๋๊ฐ ํด๋น ๊ฐ์ฒด์ ํ๋กํผํฐ๋ฅผ ์ฐธ์กฐํ๋ ค๋ฉด, ์๊ธฐ ์์ ์ ๊ฐ๋ฆฌํค๊ธฐ ์ํ ์๋ณ์๊ฐ ํ์ํ๋ฐ,
JS์์๋ ์ด๋ฅผ this ํค์๋๋ก ๋์ฒดํ๋ค.
๊ฐ์ฒด ๋ฆฌํฐ๋ด์์ ๋ฉ์๋๊ฐ ์๊ธฐ๊ฐ ํฌํจ๋ ๊ฐ์ฒด๋ฅผ ๊ฐ๋ฆฌํค๋ ๋ฐฉ๋ฒ
์๋ ์์ ๋ฅผ ํ์ธํด๋ณด์.
const myCar = { color: "grey", getColor() { return myCar.color; } }; console.log(`myCar's color is ${myCar.getColor()}.`);
๊ฐ์ฒด ๋ฆฌํฐ๋ด ๋ฐฉ์์ผ๋ก ์์ฑ๋ ๊ฐ์ฒด์์๋ ๋ฉ์๋ ๋ด๋ถ์์ ์ ์ธ๋ ๊ฐ์ฒด ์ด๋ฆ์ ํตํด ์ฌ๊ท์ ์ผ๋ก ์๊ธฐ ์์ ์ ์ฐธ์กฐํ๊ณ ๋ณ๊ฒฝํ ์ ์๋ค.
'๋ชจ๋ ์๋ฐ์คํฌ๋ฆฝํธ Deep Dive' ์์๋ ์ด ์ฐธ์กฐ ํํ์์ด ํ๊ฐ๋๋ ์์ ์ ๋ฉ์๋๊ฐ ํธ์ถ๋์ด ํจ์ ๋ชธ์ฒด๊ฐ ์คํ๋๋ ์์ ์ด๋ผ๊ณ ์ค๋ช ํ๊ณ ์๋ค. ๋ํ, ์ ์ธ๋ ๊ฐ์ฒด ๋ฆฌํฐ๋ด์ myCar ๋ณ์์ ํ ๋น๋๊ธฐ ์ง์ ์ ํ๊ฐ๋๋ค๊ณ ๋ ์๋ ค์ฃผ๊ณ ์๋ค.
์ฆ, getColor() ๋ฉ์๋๊ฐ ํธ์ถ๋๋ ์์ ์์๋ ์ด๋ฏธ ๊ฐ์ฒด ๋ฆฌํฐ๋ด์ ํ๊ฐ๋ ์๋ฃ๋์ด์๊ณ , myCar ์๋ณ์์ ๊ฐ์ฒด๊ฐ ํ ๋น๋ ์ดํ๊ธฐ ๋๋ฌธ์ myCar๋ฅผ ์ฐธ์กฐํ ์ ์๋ ๊ฒ์ด๋ค.
ํ์ง๋ง ์ฐ๋ฆฌ๊ฐ ์ค์ ๋ก JS๋ฅผ ์ฌ์ฉํด ์ฝ๋ฉ์ ํ๋ค๋ณด๋ฉด ๊ฐ์ฒด๋ฅผ ๋ฆฌํฐ๋ด๋ก ์ ์ธ, ์ ์ํ๋ ๊ฒฝ์ฐ๋ ๊ฑฐ~~~~์ ์๋ค.
๋ ์ผ๋จ ์์ ์์ด์. ์ฐ๋ฆฌ๋ ๊ฐ์ฒด ๋ฆฌํฐ๋ด์ ์ ์์ฐ์์์.
์ฐ๋ฆฌ๋ ์ฃผ๋ก ๊ฐ์ฒด๋ฅผ ์ด์ฉํ ๋์๋ ํด๋์ค์ ์์ฑ์ ํจ์๋ฅผ ์ด์ฉํ์ฌ ์๋ณ์์ ์ธ์คํด์ค๋ฅผ ํ ๋นํ๊ณ ๋ ํ๋ค.
๊ทธ๋ฆฌ๊ณ ์์ฑ์ ํจ์ ๋ด๋ถ์์๋ ์์ ์ด ์์ฑํ ์ธ์คํด์ค๋ฅผ ์ฐธ์กฐํ ์ ์์ด์ผ ํ๋ค.
์์ฑ์ ํจ์์ ์ํ ๊ฐ์ฒด ์์ฑ ๋ฐฉ์์ ๋จผ์ ์์ฑ์ ํจ์๋ฅผ ์ ์ํ ์ดํ์ ์์ฑ์ ํจ์๋ฅผ ํธ์ถํ๋ ๋จ๊ณ๊ฐ ํ์ํ๋ค.
ํ๋ฐ, ๊ฐ์ฒด์ ํ๊ฐ๋ ์๋ณ์์ ํ ๋นํ๊ธฐ '์ง์ '์ ํ๊ฐ๋๋ค๊ณ ํ๋ค.
๊ทธ๋ ๋ค๋ฉด, ์์ฑ์ ํจ์๋ฅผ ์ ์ํ๋ ์์ ์์๋ ์ธ์คํด์ค๊ฐ ์์ฑ๋๊ธฐ ์ด์ ์ด๊ธฐ ๋๋ฌธ์ ์ฐ๋ฆฌ๋ ์๋ณ์์ ์ด๋ฆ์ ํตํด ์ฌ๊ท์ ์ผ๋ก ๋ฉ์๋๊ฐ ํฌํจ๋ ๊ฐ์ฒด ์๊ธฐ ์์ ์ ์ฐธ์กฐํ ์๊ฐ ์๋ค๋ ์ด์ผ๊ธฐ๊ฐ ๋๋ค. ์ด๋ค ์๋ณ์์ ์ด๋ค ๊ฐ์ฒด์ ์ธ์คํด์ค๋ฅผ ํ ๋นํ ์ค ์๊ณ ?
๊ทธ๋์ ์๋ฐ์คํฌ๋ฆฝํธ์์๋ ์์ ์ด ์ํ ๊ฐ์ฒด, ๋๋ ๊ฐ์ฒด ์์ ์ด ์์ฑํ ์ธ์คํด์ค๋ฅผ ๊ฐ๋ฆฌํค๋ ํน์ํ ์๋ณ์, this๋ฅผ ์ ๊ณตํ๋ค.
์๋๋ this ํค์๋์ ๋ํ '๋ชจ๋ ์๋ฐ์คํฌ๋ฆฝํธ Deep Dive'์ ์ ์๋ค.
"this๋ ์์ ์ด ์ํ ๊ฐ์ฒด ๋๋ ์์ ์ด ์์ฑํ ์ธ์คํด์ค๋ฅผ ๊ฐ๋ฆฌํค๋ ์๊ธฐ ์ฐธ์กฐ ๋ณ์(self-referencing variable)๋ค. this๋ฅผ ํตํด ์์ ์ด ์ํ ๊ฐ์ฒด ๋๋ ์์ ์ด ์ํ ๊ฐ์ฒด ๋๋ ์์ ์ด ์์ฑํ ์ธ์คํด์ค์ ํ๋กํผํฐ๋ ๋ฉ์๋๋ฅผ ์ฐธ์กฐํ ์ ์๋ค."
๐ this ๋ฐ์ธ๋ฉ
this ํค์๋๋ ์๋์ผ๋ก, ์๋ฌต์ ์ผ๋ก ์์ฑ๋๋ฉฐ, ์ฝ๋ ์ด๋์๋ ์ฐธ์กฐํ ์ ์๋ค.
this๋ฅผ ์ ์ญ ๋ณ์๋ก๋, ์ง์ญ ๋ณ์๋ก๋ ํ์ฉํ ์ ์๋ค.
ํ์ง๋ง this๊ฐ ๊ฐ๋ฆฌํค๋ ๊ฐ์ ํจ์ ํธ์ถ ๋ฐฉ์์ ์ํด ๋์ ์ผ๋ก ๊ฒฐ์ ๋๋ค. ๊ทธ๋ฆฌ๊ณ ์ด๊ฒ์ this ๋ฐ์ธ๋ฉ์ด๋ผ๊ณ ํ๋ค.
๋ฐ์ธ๋ฉ์ด๋?
์๋ณ์์ ๊ฐ์ ์ฐ๊ฒฐํ๋ ๊ณผ์ ์ ์๋ฏธํ๋ค. ์๋ฅผ ๋ค์ด ๋ณ์ ์ ์ธ์ ๋ณ์ ์ด๋ฆ(์๋ณ์)๊ณผ ํ๋ณด๋ ๋ฉ๋ชจ๋ฆฌ ๊ณต๊ฐ์ ์ฃผ์๋ฅผ ๋ฐ์ธ๋ฉํ๋ ๊ฒ์ด๋ค.
์ฆ, this ๋ฐ์ธ๋ฉ์ด๋ this ์๋ณ์์ this๊ฐ ๊ฐ๋ฆฌํฌ ๊ฐ์ฒด๋ฅผ ๋ฐ์ธ๋ฉํ๋ ๊ฒ์ด๋ค.
์์์ ๊ฐ์ฒด ๋ฆฌํฐ๋ด๋ก ์ ์ธํ๋ ๊ฐ์ฒด myCar์ ๋ฉ์๋์์ myCar ์๋ณ์๋ฅผ this ํค์๋๋ก ๊ต์ฒดํ๋ฉด ์๋์ ๊ฐ๋ค.
const myCar = { color: "grey", getColor() { return this.color; } }; console.log(`myCar's color is ${myCar.getColor()}.`);
์ด ๊ฒฝ์ฐ this๊ฐ ๊ฐ๋ฆฌํค๋ ๋์์ myCar์ด๋ค.
์์ฑ์ ํจ์๋ก ์์ฑ๋ ๊ฐ์ฒด์ ์ธ์คํด์ค๋ ์ด๋จ๊น.
class Car { constructor(color) { this.color = color; } getColor() { return this.color; } } const myCar = new Car("grey"); console.log(`myCar's color is ${myCar.getColor()}.`);
์ฌ๊ธฐ์ this๊ฐ ๊ฐ๋ฆฌํค๋ ๊ฒ์ ์์ฑ์ ํจ์๊ฐ ์์ฑํ ์ธ์คํด์ค. ์ฆ myCar๋ฅผ ๊ฐ๋ฆฌํจ๋ค.
์ด๋ ๊ฒ this๋ ์ํฉ์ ๋ฐ๋ผ ์ฐธ์กฐํ๋ ๋์์ด ๋ฌ๋ผ์ง๋ค.
JS์ this๋ ํจ์ ํธ์ถ ๋ฐฉ์์ ๋ฐ๋ผ this ๋ฐ์ธ๋ฉ์ด ๋์ ์ผ๋ก ๊ฒฐ์ ๋๋ ํน์ฑ์ ๊ฐ์ง๋ค.
๐โ๏ธ ํจ์ ํธ์ถ ๋ฐฉ์์ ๋ฐ๋ฅธ this ๋ฐ์ธ๋ฉ
๊ทธ๋ผ ํจ์ ํธ์ถ ๋ฐฉ์์ ๋ฐ๋ผ ๋์ ์ผ๋ก ๊ฒฐ์ ๋๋ this ๋ฐ์ธ๋ฉ์ ๋ค์ํ ์๋ฅผ ์ดํด๋ณด์.
์์ ๋ ์๊ธฐํ ์์ ์ธ '๋ชจ๋ ์๋ฐ์คํฌ๋ฆฝํธ Deep Dive'์์ ์ผ๋ถ ๋ฐ์ทํ๋ค.
1. ์ผ๋ฐ ํจ์ ํธ์ถ
์ผ๋ฐ ํจ์ ํธ์ถ์์ ๊ธฐ๋ณธ์ ์ผ๋ก this์๋ ์ ์ญ ๊ฐ์ฒด, ์ฆ window ๊ฐ์ฒด๊ฐ ๋ฐ์ธ๋ฉ๋๋ค.
ํ์ง๋ง strict mode(์๊ฒฉ ๋ชจ๋)๊ฐ ์ ์ฉ๋ ํจ์์ผ ๊ฒฝ์ฐ this์๋ undefined๊ฐ ๋ฐ์ธ๋ฉ๋๋ค.
๋ํ ์ฝ๋ฐฑ ํจ์๊ฐ ์ผ๋ฐ ํจ์๋ก ํธ์ถ ๋์์ ๊ฒฝ์ฐ์๋ ์ฝ๋ฐฑ ํจ์์ ๋ด๋ถ this์๋ ์ ์ญ ๊ฐ์ฒด๊ฐ ๋ฐ์ธ๋ฉ ๋๋ค.
์ฆ, ์ด๋ ํ ํจ์์ผ์ง๋ผ๋ ์ผ๋ฐ ํจ์๋ก ํธ์ถ๋์์ ๊ฒฝ์ฐ์๋ this์ ์ ์ญ ๊ฐ์ฒด๊ฐ ๋ฐ์ธ๋ฉ ๋๋ค๋ ๊ฒ์ด๋ค.
๊ทธ๋ฆฌ๊ณ this๋ '๊ฐ์ฒด์ ํ๋กํผํฐ๋ ๋ฉ์๋๋ฅผ ์ฐธ์กฐํ๊ธฐ ์ํ ์๊ธฐ ์ฐธ์กฐ ๋ณ์'์ด๋ฏ๋ก ๊ฐ์ฒด๋ฅผ ์์ฑํ์ง ์๋ ์ผ๋ฐ ํจ์์์ this๋ ๋ฌด์๋ฏธํ๋ค.
function hello() { console.log("hello์ this: ", this); //window function world() { console.log("world์ this: ", this); //window } world(); }; hello();
์์ ๊ฐ์ด ๋ฉ์๋ ๋ด์์ ์ค์ฒฉ ํจ์๋ฅผ ์ ์ํ์ฌ ์ผ๋ฐ ํจ์๋ก ํธ์ถํ๋ฉด ์ค์ฒฉ ํจ์ ๋ด๋ถ์ this์๋ ์ ์ญ ๊ฐ์ฒด window๊ฐ ๋ฐ์ธ๋ฉ๋๋ค.
function hello() { 'use strict'; console.log("hello์ this: ", this); //undefined function world() { console.log("world์ this: ", this); //undefined } world(); }; hello();
use strict๋ฅผ ํตํด ํจ์์ strict mode๋ฅผ ์ง์ ํด์ฃผ๋ฉด ์ ์ญ ๊ฐ์ฒด๊ฐ ์๋ undefined๊ฐ ๋ฐ์ธ๋ฉ๋๋ค.
2. ๋ฉ์๋ ํธ์ถ
๊ทธ๋ ๋ค๋ฉด ๊ฐ์ฒด์ ๋ฉ์๋ ํธ์ถ์ ๊ฒฝ์ฐ๋ ์ด๋จ๊น?
๋ฉ์๋ ๋ด๋ถ์ this์๋ ๋ฉ์๋๋ฅผ ํธ์ถํ ๊ฐ์ฒด๊ฐ ๋ฐ์ธ๋ฉ ๋๋ค.
const myCar = { color: "grey", getColor() { return this.color; } }; console.log(`myCar's color is ${myCar.getColor()}.`); //myCar๊ฐ ๋ฐ์ธ๋ฉ๋๋ค.
์ฆ, ๋ฉ์๋ ํธ์ถ์ ์ํด ์ฌ์ฉ๋๋ . ์ฐ์ฐ์ ์์ ๊ฐ์ฒด๊ฐ ๋ฐ์ธ๋ฉ ๋๋ค๋ ๋ป์ด๋ค.
์ฌ๊ธฐ์ ์ฃผ์ํด์ผํ ๊ฒ์ด ์๋ค. ํด๋น ๋ฉ์๋๋ฅผ ์์ ํ๊ณ ์๋ ๊ฐ์ฒด๊ฐ ์๋ ๋ฉ์๋๋ฅผ 'ํธ์ถํ' ๊ฐ์ฒด์ ๋ฐ์ธ๋ฉ ๋๋ค๋ ๋ป์ด๋ค.
์๋ํ๋ฉด ์์ ์์ ์์ getColor ๋ฉ์๋๋ getColor๋ผ๋ ์ด๋ฆ์ ํ๋กํผํฐ์ ๋ฐ์ธ๋ฉ ๋ ํจ์๋ค. ๋ฐ๋ผ์ myCar ๊ฐ์ฒด์ getColor ๋ฉ์๋๋ ๊ฐ์ฒด์ ํฌํจ๋ ๊ฒ์ด ์๋๋ผ ๋ ๋ฆฝ์ ์ผ๋ก ์กด์ฌํ๋ ๋ณ๋์ ๊ฐ์ฒด์ผ ๋ฟ์ด๊ณ , getColor ํ๋กํผํฐ๊ฐ ํด๋น ํจ์ ๊ฐ์ฒด๋ฅผ ์ฐธ์กฐํ๊ณ ์์ ๋ฟ์ด๋ผ๋ ๊ฒ์ด๋ค. ๋ฐ๋ผ์ getColor ๋ฉ์๋๋ ๋ณ๋์ ์ผ๋ฐ ๋ณ์์ ํ ๋นํ์ฌ ์ผ๋ฐ ํจ์๋ก๋ ํธ์ถํ ์ ์๋ค.
3. ์์ฑ์ ํจ์ ํธ์ถ
์์ฑ์ ํจ์ ๋ด๋ถ์ this๋ ํด๋น ์์ฑ์ ํจ์๊ฐ ๋ฏธ๋์ ์์ฑํ ์ธ์คํด์ค๊ฐ ๋ฐ์ธ๋ฉ ๋๋ค.
class Car { constructor(color) { this.color = color; } getColor() { return this.color; } } const myCar = new Car("grey"); console.log(`myCar's color is ${myCar.getColor()}.`); //Car์ ์ธ์คํด์ค myCar๊ฐ ๋ฐ์ธ๋ฉ๋จ
์ด ์ธ์๋ Function.prototype.apply, Function.prototype.call, Function.prototype.bind ๋ฉ์๋์ ์ํ ๊ฐ์ ํธ์ถ์ ๋ฐ๋ฅธ ๋ฐ์ธ๋ฉ์ด ์์ง๋ง, prototype์ด ๊ธฐ์ ๋ถ์ฑ๋ก ์์ฌ ์๊ธฐ ๋๋ฌธ์ prototype์ ๋ํ ํ์ต์ด ๋๋๋ ๋๋ก ํด๋น ํํธ๋ฅผ ๋ค์ ํ์ตํ์ฌ ์ ๋ฆฌํด ๋ณผ ์๊ฐ์ด๋ค.
์ด๋ฒ TIL์ this ํค์๋์ this ๋ฐ์ธ๋ฉ์ ๋ํด ๊ฐ๋จํ ์ ๋ฆฌํด๋ณด์๋ค.
prototype์ด๋ ๊ฝค ์ฑ ์ ์ ๋ถ๋ถ์์ ์ค๋ช ํ๋ ๊ฒ์ด๊ธด ํ๋, ๊ทธ๋์์ '์๋ฐ์คํฌ๋ฆฝํธ๋ฅผ ์ด์ฉํด ๊ฒฐ๊ณผ๋ฅผ ๋ง๋๋ ๊ฒ'์ ์ง์คํ ๋๋จธ์ง ์ด๋ ๊ฒ ์์ธํ๊ฒ ๋ค์ฌ๋ค ๋ณด๋ ์ต๊ด์ด ์์๊ธฐ์ ์ง๊ธ์ ๋ด๊ฒ๋ ๊ธฐ์ ๋ถ์ฑ๊ฐ ๋์๋ค. ์ด ์ ์ ๊น์ด ๋ฐ์ฑํ๋ฉฐ ์ด๋ ๊ฒ ๊ผฌ๋ฆฌ์ ๊ผฌ๋ฆฌ๋ฅผ ๋ฌด๋ ์ฐ์ ํ์ต์ ํตํด ๋ค์ ๊ธฐ๋ณธ๊ธฐ๋ฅผ ํํํ ๋ง๋ค์ด๋๊ฐ๋ ์๊ฐ์ด ๋์์ผ๋ฉด ์ข๊ฒ ๋ค.
'Web Programming > JavaScript' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[JS] prototype 1ํธ : prototype์ ํตํ ์์ ํบ์๋ณด๊ธฐ (0) 2025.06.19 [JavaScript] ES6 ๋ฌธ๋ฒ์ ๊ฐ๋จํ ์ ๋ฆฌํด๋ณด์. (0) 2022.11.25 [JavaScript] ํ์ดํ ํจ์(Arrow Function) ๊ธฐ๋ณธ ์ฉ๋ฒ ์ ๋ฆฌ (0) 2022.11.10