JSFiddle - React, Tailwind, and code Playground
JavaScript
function getCurrentMonth() {
var date = new Date();
console.log (date.getMonth());
if (date.getMonth() == 10) {
console.log("November")
}
}
getCurrentMonth();
function getYear() {
let date = new Date();
// Get full year
year = date.getFullYear();
return year
}