Birthday

by helpinspireme

JavaScript

var sender = "Christopher Brooks";
var friend = "Nathan Morgan";
var todaysDate = new Date();
var date =(todaysDate.getMonth()+1) + '/' + todaysDate.getDate() + '/' + todaysDate.getFullYear();

function birthday() {
    if (date == '3/29/2012') {
        alert('Happy Birthday ' + friend + '!');
    } else {
        alert('It\'s not your Birthday!  Return the gift to ' + sender +'.');
    }
}

birthday();