Skip to content

Commit 2e9c307

Browse files
authored
Merge pull request #864 from ArMANIAK/patch-2
Семантическая неточность
2 parents d64b562 + 7f11442 commit 2e9c307

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

1-js/09-classes/02-class-inheritance/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Animal {
1111
this.name = name;
1212
}
1313
run(speed) {
14-
this.speed += speed;
14+
this.speed = speed;
1515
alert(`${this.name} бежит со скоростью ${this.speed}.`);
1616
}
1717
stop() {
@@ -57,7 +57,7 @@ class Animal {
5757
this.name = name;
5858
}
5959
run(speed) {
60-
this.speed += speed;
60+
this.speed = speed;
6161
alert(`${this.name} бежит со скоростью ${this.speed}.`);
6262
}
6363
stop() {
@@ -144,7 +144,7 @@ class Animal {
144144
}
145145
146146
run(speed) {
147-
this.speed += speed;
147+
this.speed = speed;
148148
alert(`${this.name} бежит со скоростью ${this.speed}.`);
149149
}
150150

0 commit comments

Comments
 (0)