Write a function named: countDownTimer(n). This function will represent a count
down of days till the New Year. The countDownTimer function will
take in a number argument (n) the first time it is called and if that
number is greater than 0 the countDownTimer will return a function.
The function returned by countDownTimer can then be invoked n times before it
returns a string of “Happy New Year!”.
function countDownTimer(n) {
var count = 0;
var temp;
while (count !== n) {
if (n !== 0) {
return function() {
temp = function() {};
count++;
return temp;
}
} else {
return 'Happy New Year!'
}
}
return 'Happy New Year!'
};