Skip to content

Commit aa0f299

Browse files
Updated command, state and visitor patterns
1 parent 99e5642 commit aa0f299

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Kapitel8/Command/Klassensyntax/Command.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@
124124
// Client
125125
const videoPlayer = new VideoPlayer();
126126
const buttonOn = new Button(videoPlayer.switchOn.bind(videoPlayer));
127-
const buttonOf = new Button(videoPlayer.switchOff.bind(videoPlayer));
127+
const buttonOff = new Button(videoPlayer.switchOff.bind(videoPlayer));
128128
buttonOn.click();
129-
buttonOf.click();
129+
buttonOff.click();
130130
})();
131131

132132
(function () {

Kapitel8/State/ES2015/State.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
this.states = {
8181
playing: new PlayingState(this),
8282
stopped: new StoppedState(this)
83-
}
83+
};
8484
this.initialize();
8585
}
8686

Kapitel8/Visitor/Klassensyntax/Visitor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
new Album('The Doors', 'The Soft Parade', 1969, 10)
8383
];
8484

85-
Album.prototype.setDiscount = function(discount) {
85+
Album.prototype.setDiscount = function(discount){
8686
this.setPrice(Math.round(this.getPrice() * discount));
8787
};
8888

0 commit comments

Comments
 (0)