javascript get year from today 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
Example 3: how to get current year in javascript
new Date().getFullYear()
// returns the current year