Task

Pass a function     as an argument     to another function.



Related task

   First-class functions


function first (func) {
  return func();
}
 
function second () {
  return "second";
}
 
var result = first(second);
result = first(function () { return "third"; });