In a function in JS where the user spends the year as a parameter and the function returns the century of that year, but my function always returns 1.
function centuryFromYear(year) {
if (year => 1 || year <= 101)return 1
else if (year => 102 || year <= 201)return 2
else if (year => 202 || year <= 301) return 3
else if (year => 302 || year <= 401)return 4
else if (year => 402 || year <= 501)return 5
else if (year => 502 || year <= 601)return 6
else if (year => 602 || year <= 701)return 7
else if (year => 702 || year <= 801)return 8
else if (year => 802 || year <= 901)return 9
else if (year => 902 || year <= 1001)return 10
else if (year => 1002 || year <= 1101)return 11
else if (year => 1102 || year <= 1201)return 12
else if (year => 1202 || year <= 1301)return 13
else if (year => 1302 || year <= 1401)return 14
else if (year => 1402 || year <= 1501)return 15
else if (year => 1502 || year <= 1601)return 16
else if (year => 1602 || year <= 1701)return 17
else if (year => 1702 || year <= 1801)return 18
else if (year => 1802 || year <= 1901)return 19
else if (year => 1902 || year <= 2001)return 20
else if (year => 2002 || year <= 2101)return 21
}