Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get previous year in javascript

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

const previousYear =  currentYear-1;

console.log(previousYear); // 2019
Source by reactgo.com #
 
PREVIOUS NEXT
Tagged: #previous #year #javascript
ADD COMMENT
Topic
Name
3+2 =