index.tsx172 chars5 lines
Explanation:
getFullYear()
and subtract the remainder when divided by 10. For example, if the current year is 2021, then 2021 % 10
will give us 1, so we subtract 1 from 2021 to get the year 2020, which is the start of the current decade.gistlibby LogSnag