get currect year js code example
Example 1: Javascript get current year
var currentYear= new Date().getFullYear();
Example 2: how to get current year in nodejs
const todaysDate = new Date()
const currentYear = todaysDate.getFullYear()
// 2020
var currentYear= new Date().getFullYear();
const todaysDate = new Date()
const currentYear = todaysDate.getFullYear()
// 2020