Menu
hey guys have a look at the below function , very simple and straightforward :
[CODE]function countdown (sec, onTick) {
onTick(sec);
if (sec) setTimeout(function () {
countdown(–sec, onTick);
}, 1000);
}
onload = function () {
countdown(5, function (sec) {
console.log(sec ? sec + ‘ ‘ : ‘BOOM!’);
});
};
onload();
what is the js terminology for “countdown” inside the onload function ?
Thank you.
Gautam.