var currentYear= new Date().getFullYear();

Javascript get current year

new Date().getFullYear(); // This will get you the current year

how to get the year in javascript

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

how to get current year in nodejs

let currentYear= new Date().getFullYear();

Javascript get current year\

const Year = new Date().getFullYear(); console.log(Year)

Javascript get current year

const currentYear = todaysDate.getFullYear()

Javascript get current year

Similar Code Examples