get all years after 2020 in js code example Example: get year from date javascript document.write(new Date().getFullYear());