Skip to content

Commit 22e7463

Browse files
committed
named all anonymous functions
1 parent fad6cbc commit 22e7463

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/prototype.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function GameObject(attributes) {
5656
this.dimensions = attributes.dimensions;
5757
}
5858

59-
GameObject.prototype.destroy = function () {
59+
GameObject.prototype.destroy = function destroy() {
6060
return 'Game object was removed from the game.';
6161
};
6262

@@ -68,7 +68,7 @@ function NPC(NPCAttributes) {
6868

6969
NPC.prototype = Object.create(GameObject.prototype);
7070

71-
NPC.prototype.takeDamage = function () {
71+
NPC.prototype.takeDamage = function takeDamage() {
7272
return `${this.name} took damage.`;
7373
};
7474

@@ -82,7 +82,7 @@ function Humanoid(HumanoidAttributes) {
8282

8383
Humanoid.prototype = Object.create(NPC.prototype);
8484

85-
Humanoid.prototype.greet = function () {
85+
Humanoid.prototype.greet = function greet() {
8686
return `${this.name} offers a greeting in ${this.language}.`;
8787
};
8888

0 commit comments

Comments
 (0)