JSFiddle - React, Tailwind, and code Playground
by Esther Mun
JavaScript
function isItSoEunsBirthday(date) {
var myBirthday = new Date(1990, 2, 6);
if (date.getMonth() == myBirthday.getMonth() && date.getDate() == myBirthday.getDate()) {
var message = alert(date.toString() + " is your birthday! Happy birthday!");
return message;
} else {
return false;
}
}
function isTodaySoEunsBirthday() {
return isItSoEunsBirthday(new Date());
}
isTodaySoEunsBirthday();
//for(var checkDate = new date(); !(isItSoEunsBirthday(checkDate); checkDate.setDate(checkDate.getDate() + 1) ) {
// alert(date.toString() + " is not your birthday!");
//}