event listener์ constructor
const ๊ฐ์ฒด = {}
function ๊ณต์ฅ() {
this.์ด๋ฆ = 'kim' //์ฌ๊ธฐ์์ this๋ ์๋ก ์์ฑ๋๋ ์ค๋ธ์ ํธ (instance)๋ฅผ ๋ปํ๋ค.
}
const ์ค๋ธ์ ํธ = new ๊ณต์ฅ();
console.log(์ค๋ธ์ ํธ)
// ๊ฒฐ๊ณผ)
๊ณต์ฅย {์ด๋ฆ: "kim"}
Last updated
Was this helpful?