Beesbeesbees ๊ณผ์ œ

๋ฌธ์ œ src ๋””๋ ‰ํ† ๋ฆฌ ์•ˆ์—๋Š” ํด๋ž˜์Šค๊ฐ€ ์กด์žฌํ•ฉ๋‹ˆ๋‹ค. constructor, super, extends, class ํ‚ค์›Œ๋“œ๋ฅผ ์ด์šฉํ•˜์—ฌ ๊ตฌํ˜„ํ•ฉ๋‹ˆ๋‹ค. ์ƒ์†๊ณผ ๊ด€๋ จ๋œ ํ‚ค์›Œ๋“œ super, extends๋Š” ๊ณต์‹๋ฌธ์„œ๋ฅผ ์ฝ์–ด๋ณธ ํ›„ ์ ์šฉํ•ด๋ด…๋‹ˆ๋‹ค. ํ’€์ด ๋จผ์ € Grub ์„ ์™„์„ฑํ•œ๋’ค, Bee, HoneMakerBee,ForagerBee ์ˆœ์„œ๋Œ€๋กœ ์™„์„ฑํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. class Grub { // TODO.. constructor(){ // class๋Š” ํ•ญ์ƒ constructor()๋ฅผ ํฌํ•จํ•œ๋‹ค this.age = 0; this.color = `pink`; this.food = `jelly`; } eat(){ return `Mmmmmmmmm jelly` // ์ฝ˜์†”์ด ์•„๋‹ˆ๋ผ ๋ฆฌํ„ด์„ ์จ์•ผ ํ–ˆ๋‹ค } } module.exports = Grub..
becky(์ง€์€)
'Beesbeesbees ๊ณผ์ œ' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก