How to get the current year using JavaScript?
Originally Published Here ๐!
To get the current year, we can use the getFullYear() method from the global Date object in JavaScript.
TL;DR
// Make an instance or object of the Date constructor
const currentDate = new Date();
// get the current year...
melvingeorge-me.hashnode.dev1 min read