We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86e9c66 commit b3f0cc7Copy full SHA for b3f0cc7
decorator/README.md
@@ -104,9 +104,9 @@ troll.attack(); // The troll tries to grab you!
104
troll.fleeBattle(); // The troll shrieks in horror and runs away!
105
106
// change the behavior of the simple troll by adding a decorator
107
-troll = new ClubbedTroll(troll);
108
-troll.attack(); // The troll tries to grab you! The troll swings at you with a club!
109
-troll.fleeBattle(); // The troll shrieks in horror and runs away!
+Troll clubbedTroll = new ClubbedTroll(troll);
+clubbedTroll.attack(); // The troll tries to grab you! The troll swings at you with a club!
+clubbedTroll.fleeBattle(); // The troll shrieks in horror and runs away!
110
```
111
112
## Applicability
0 commit comments