JSFiddle - React, Tailwind, and code Playground
JavaScript
function add (a,b){return a+b;}
function multiply (a,b){return a*b;}
function applyFn(callback) {
return callback;
};
var f = applyFn(add);
console.log(f); //logs => function add(a,b){return a+b;}
alert(f(3, 4)); // returns => Uncaught TypeError: f(...) is not a function(…)