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

console.log(this.name,	friend);
           				});
           		},
           };
           relationship2.logFriends();




         relationship1.logFriends   উ੄ forEachޙীࢲח function ࢶ঱ޙਸ ࢎਊ೮णפ׮  п੗ ׮ܲ ೣࣻ झ௏೐
         ੄ thisܳ о૑޲۽ that੉ۄח ߸ࣻܳ ࢎਊ೧ࢲ relationship1ী р੽੸ਵ۽ ੽ӔೞҊ ੓णפ׮


         ೞ૑݅ relationship2.logFriends() উ੄ forEachޙীࢲח ച࢓಴ ೣࣻܳ ࢎਊ೮णפ׮  ٮۄࢲ ߄Ӵ झ௏೐
         ੋ MPH'SJFOET  ੄ thisܳ Ӓ؀۽ ࢎਊೡ ࣻ ੓णפ׮  ࢚ਤ झ௏೐੄ thisܳ Ӓ؀۽ ޛ۰߉ח Ѫੑפ׮


         ૊  ӝࠄ੸ਵ۽ ച࢓಴ ೣࣻܳ ॳغ  thisܳ ࢎਊ೧ঠ ೞח ҃਋ীח ച࢓಴ ೣࣻ৬ ೣࣻ ࢶ঱ޙ(function) ઺
         ীࢲ ೞաܳ Ҋܰݶ ؾפ׮


          
          
               ҳઑ࠙೧ ೡ׼

         ҳઑ࠙೧ ೡ׼ਸ ࢎਊೞݶ ё୓৬ ߓৌ۽ࠗఠ ࣘࢿ੉ա ਃࣗܳ औѱ ԁյ ࣻ ੓णפ׮

         ׮਺਷ ё୓੄ ࣘࢿਸ э਷ ੉ܴ੄ ߸ࣻী ؀ੑೞח ௏٘ੑפ׮




           var	candyMachine	=	{
           		status:	{
           				name:	'node',
           				count:	5,
           		},
           		getCandy:	function	()	{
           				this.status.count--;
           				return	this.status.count;
           		},
           };
           var	getCandy	=	candyMachine.getCandy;
           var	count	=	candyMachine.status.count;




         ੉ ௏٘ܳ ׮਺җ э੉ ߄Ե ࣻ ੓णפ׮




           const	candyMachine	=	{
           		status:	{
           				name:	'node',
           				count:	5,
   55   56   57   58   59   60   61   62   63   64   65