super()

super ํ‚ค์›Œ๋“œ super() ํ‚ค์›Œ๋“œ๋Š” ์ƒ์œ„(๋ถ€๋ชจ)๊ฐ์ฒด์˜ ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•  ๋•Œ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค ๋‹จ, constructor(์ƒ์„ฑ์ž) ์•ˆ์—์„œ๋Š” super ํ‚ค์›Œ๋“œ ํ•˜๋‚˜๋งŒ ์‚ฌ์šฉ๋˜๊ฑฐ๋‚˜ this ํ‚ค์›Œ๋“œ ์ „์— ๋จผ์ € ํ˜ธ์ถœ๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ ์˜์—ญ์„, ์ž์‹ํด๋ž˜์Šค(๋‚˜)๋„ ํฌํ•จํ•˜๊ณ  ์žˆ๋Š” ๊ฒฝ์šฐ! ์ค‘๋ณต์„ ์ค„์ด๋ ค๊ณ  ๊ทธ๋•Œ, ์‚ฌ์šฉํ•˜๋Š” ํ‚ค์›Œ๋“œ 'super' super ํ˜•ํƒœ 2๊ฐ€์ง€ 1.super() = ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ ์ƒ์„ฑ์ž(constructor) 2.super. = ๋ถ€๋ชจํด๋ž˜์Šค์˜ class Person { constructor(name, first, second){ this.name =name; this.first=first; this.second=second; } sum(){ return this.first+this.second; } ..
becky(์ง€์€)
'super()' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก