This function takes a year as a parameter and returns the century it belongs to.
The year to determine the century for. Must be a valid year number.
The century the year belongs to.
Will throw an error if the year is not a valid number.
getCentury(2000);;//=> 20getCentury(1899);;//=> 19 Copy
getCentury(2000);;//=> 20getCentury(1899);;//=> 19
Generated using TypeDoc
This function takes a year as a parameter and returns the century it belongs to.