Here's one example:
//Higher Order Functions: passing function(s) to other functions
function sing() {
console.log("twinkle twinkle...")
console.log("how I wonder...")
}
setInterval(sing, 1000);//pass the function sing() as an argument + 1000 is a milliseconds
clearInterval(2);
setInterval(function () {
console.log("I am an anonymous function");
console.log("THIS IS AWESOME!");
}, 2000);//2000 milliseconds