KS
const getCentury = (year=0) => Math.ceil(year * 0.01) || 1;
Size: a a a
KS
const getCentury = (year=0) => Math.ceil(year * 0.01) || 1;
VK
ЕШ
VK
ЕШ
VK
const getCentury = (year=0) => Math.ceil(year * 0.01) || 1;
VK
T
ЕШ
KS
function getCentury(year) {return Math.ceil(year * 0.01) || 1};
console.log(getCentury(2020));
VK
VK
KS
function getCentury(year) {return Math.max(Math.ceil(year * 0.01),1);
}
console.log(getCentury(2020));
KS
ЕШ
ЕШ
ЕШ
function getCentury(year) {return Math.max(Math.ceil(year * 0.01),1);
}
console.log(getCentury(2020));
VK
ЕШ