minor fixes

This commit is contained in:
Ilya Kantor 2020-03-01 08:44:34 +00:00
parent 88120708b1
commit c72cca89d5

View file

@ -16,7 +16,7 @@ class Animal {
this.name = name; this.name = name;
} }
run(speed) { run(speed) {
this.speed += speed; this.speed = speed;
alert(`${this.name} runs with speed ${this.speed}.`); alert(`${this.name} runs with speed ${this.speed}.`);
} }
stop() { stop() {
@ -124,7 +124,7 @@ class Animal {
} }
run(speed) { run(speed) {
this.speed += speed; this.speed = speed;
alert(`${this.name} runs with speed ${this.speed}.`); alert(`${this.name} runs with speed ${this.speed}.`);
} }