Siglos de Javascript

function centuryFromYear(year) {
    var x = Math.floor(year / 100);
    if (year % 100 === 0)
        return x;
    else
        return x + 1;
}
Wide-eyed Whale