Page 63 - Nodejs 교과서 개정2판
P. 63

breathe()	{
           				alert('h-a-a-a-m');
           		}
           }


           class	Zero	extends	Human	{
           		constructor(type,	firstName,	lastName)	{
           				super(type);
           				this.firstName	=	firstName;
           				this.lastName	=	lastName;
           		}


           		sayName()	{
           				super.breathe();
           				alert(`${this.firstName}	${this.lastName}`);
           		}
           }


           const	newZero	=	new	Zero('human',	'Zero',	'Cho');
           Human.isHuman(newZero);	//	true




         ੹߈੸ਵ۽ class উਵ۽ Ӓܛചػ Ѫਸ ࠅ ࣻ ੓णפ׮  ࢤࢿ੗ ೣࣻח constructor উਵ۽ ٜযщҊ  Human i
         sHuman э਷ ௿ېझ ೣࣻח static ఃਕ٘۽ ੹ജغ঻णפ׮  ೐۽షఋੑ ೣٜࣻب ݽف class ࠶۾ উী ನೣ

         غয যڃ ೣࣻо যڃ ௿ېझ ࣗࣘੋ૑ ࠁӝ औणפ׮  ࢚ࣘب рױ೧ઉࢲ extends ఃਕ٘۽ औѱ ࢚ࣘ оמ೤
         פ׮  ׮݅  ੉ۧѱ ௿ېझ ޙߨਵ۽ ߄Շ঻؊ۄب ੗߄झ௼݀౟ח ೐۽షఋੑ ӝ߈ਵ۽ ز੘ೠ׮ח Ѫਸ ݺब

         ೧ঠ ೤פ׮

          
          
               ೐۽޷झ

         ੗߄झ௼݀౟৬ ֢٘ীࢲח ઱۽ ࠺زӝܳ ੽೤פ׮  ౠ൤ ੉߮౟ ܻझցܳ ࢎਊೡ ٸ ௒ߔ ೣࣻܳ ੗઱ ࢎਊ೤
         פ׮  &4    ࠗఠח ੗߄झ௼݀౟৬ ֢٘੄ "1*ٜ੉ ௒ߔ ؀न ೐۽޷झ 1SPNJTF  ӝ߈ਵ۽ ੤ҳࢿغݴ  ঈݺ

         ֫਷ ௒ߔ ૑ৠ DBMMCBDL IFMM  അ࢚ਸ ӓࠂ೮׮ח ಣоܳ ߉Ҋ ੓णפ׮  ೐۽޷झח ߈٘द ঌইفযঠ ೞח ё
         ୓੉޲۽ ੉ ଼ࡺ݅ ইפۄ ׮ܲ ੗ܐٜਸ ଵҊ೧ࢲۄب ߈٘द ࣼ૑೧ঠ ೤פ׮


         ೐۽޷झח ׮਺җ э਷ ӏ஗੉ ੓णפ׮  ݢ੷ ೐۽޷झ ё୓ܳ ࢤࢿ೧ঠ ೤פ׮




           const	condition	=	true;	//	true면	resolve,	false면	reject
           const	promise	=	new	Promise((resolve,	reject)	=>	{
           		if	(condition)	{
   58   59   60   61   62   63   64   65   66   67   68