HockeyGame

Represent a the scoring of a hockey game. The two teams playing are "home" and "away".

new HockeyGame()
Instance Members
▸ home
▸ away
▸ homeTeamScores()
▸ awayTeamScores()
▸ winner()

HockeyPlayer

Class representing a simple hockey player. The hockey player has a name (first and last) and a date of birth.

new HockeyPlayer(firstName: String, lastName: String, dateOfBirth: Date)
Parameters
firstName (String) the first name of the player
lastName (String) the last name of the player
dateOfBirth (Date) the birth date of the player
Instance Members
▸ firstName
▸ lastName
▸ dateOfBirth
▸ name
▸ currentAge()

HockeyPlayerStatistics

Class representing a simple hockey player with some statistics attached to it.

new HockeyPlayerStatistics(firstName: String, lastName: String, dateOfBirth: Date)
Parameters
firstName (String) the first name of the player
lastName (String) the last name of the player
dateOfBirth (Date) the birth date of the player
Instance Members
▸ firstName
▸ lastName
▸ dateOfBirth
▸ setNumberOfPlayedGames(numberOfPlayedGames)
▸ setNumberOfPlayedPlayoffGames(numberOfPlayedPlayoffGames)
▸ setNumberOfPointsDuringPlayoffGames(numberOfPointsDuringPlayoffGames)
▸ setNumberOfPoints(numberOfPoints)
▸ setNumberOfGoals(goals)
▸ pointsPerGame
▸ pointsPerPlayoffGame
▸ goalByPlayedGame

isValidIsbn13

Validate is the input string is a valid 13 digits ISBN as defined in https://en.wikipedia.org/wiki/ISBN

isValidIsbn13(str: String): boolean
Parameters
str (String) a text we want to test if it is a real isbn
Returns
boolean: true/false depending is str is a valid 13 digits ISBN

isValidIsbn10

Validate is the input string is a valid 10 digits ISBN as defined in https://en.wikipedia.org/wiki/ISBN

isValidIsbn10(str: String): boolean
Parameters
str (String) a text we want to test if it is a real isbn
Returns
boolean: true/false depending is str is a valid 10 digits ISBN

isValidIsbn

Validate is the input string is a valid ISBN https://en.wikipedia.org/wiki/ISBN

isValidIsbn(str: String): boolean
Parameters
str (String) a text we want to test if it is a real isbn
Returns
boolean: true/false depending is str is a valid isbn

INFINITY

In statistics, infinity is set to 30.

INFINITY

Type: number

average

Computes the average of the list. If the list is empty, the function returns NaN

average(lst: Array<number>): any
Parameters
lst (Array<number>)
Returns
any: the average of the list.

std

Computes the standard deviation of the list. If the list is empty, the function returns NaN

std(lst: Array<number>): any
Parameters
lst (Array<number>)
Returns
any: the standard deviation of the list.