Answers for "get previous year in javascript"

0

get previous year in javascript

const currentYear = new Date().getFullYear(); // 2020

const previousYear =  currentYear-1;

console.log(previousYear); // 2019
Posted by: Guest on August-29-2021

Code answers related to "get previous year in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language