minor fixes
This commit is contained in:
parent
88120708b1
commit
c72cca89d5
1 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ class Animal {
|
|||
this.name = name;
|
||||
}
|
||||
run(speed) {
|
||||
this.speed += speed;
|
||||
this.speed = speed;
|
||||
alert(`${this.name} runs with speed ${this.speed}.`);
|
||||
}
|
||||
stop() {
|
||||
|
@ -124,7 +124,7 @@ class Animal {
|
|||
}
|
||||
|
||||
run(speed) {
|
||||
this.speed += speed;
|
||||
this.speed = speed;
|
||||
alert(`${this.name} runs with speed ${this.speed}.`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue