Gaming Samurai

an example of a simple JS closure

// create a new function to tell someone Happy New Year
// using "name" as the input value

function NYE(name) {
	var text = 'Happy New Years, ' + name;
    var greetingMsg = function() {
    	alert(text);
    }
    return greetingMsg;
}