File tree Expand file tree Collapse file tree 3 files changed +16
-16
lines changed
Expand file tree Collapse file tree 3 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 1+ var Espresso = function ( )
2+ {
3+ Beverage . apply ( this ) ;
4+ this . sDescription = 'Espresso' ;
5+ } ;
6+ Espresso . prototype = new Beverage ( ) ;
7+ Espresso . prototype . cost = function ( )
8+ {
9+ return 1.99 ;
10+ } ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 33 < title > Decorator Pattern</ title >
44 < script type ="text/javascript " src ="Beverage.js "> </ script >
55 < script type ="text/javascript " src ="CondimentDecorator.js "> </ script >
6- < script type ="text/javascript " src ="Expresso .js "> </ script >
6+ < script type ="text/javascript " src ="Espresso .js "> </ script >
77 < script type ="text/javascript " src ="HouseBlend.js "> </ script >
88 < script type ="text/javascript " src ="Mocha.js "> </ script >
99 < script type ="text/javascript " src ="Whip.js "> </ script >
1010 </ head >
1111 < body >
1212 < script type ="text/javascript ">
13- var oHouseBlendWithMochaAndWhip = new Expresso ( ) ;
14- oHouseBlendWithMochaAndWhip = new Mocha ( oHouseBlendWithMochaAndWhip ) ;
15- oHouseBlendWithMochaAndWhip = new Whip ( oHouseBlendWithMochaAndWhip ) ;
16-
17- console . log ( oHouseBlendWithMochaAndWhip . cost ( ) ) ;
13+ var oEspressoWithMochaAndWhip = new Espresso ( ) ;
14+ oEspressoWithMochaAndWhip = new Mocha ( oEspressoWithMochaAndWhip ) ;
15+ oEspressoWithMochaAndWhip = new Whip ( oEspressoWithMochaAndWhip ) ;
16+
17+ console . log ( oEspressoWithMochaAndWhip . cost ( ) ) ;
1818 </ script >
1919 </ body >
2020</ html >
You can’t perform that action at this time.
0 commit comments