added extra function
This commit is contained in:
1 parent
7edf62204e
commit
8651ede879
1 file changed
+7
@@ -130,6 +130,13 @@ export class HockeyPlayerStatistics {
|
||||
this.dateOfBirth = dateOfBirth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current age of the player in years.
|
||||
*/
|
||||
currentAge(){
|
||||
return new HockeyPlayer(this.firstName, this.lastName, this.dateOfBirth).currentAge();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the total number the player has played
|
||||
|
||||
Reference in new issue
Block a user