JSFiddle - React, Tailwind, and code Playground
JavaScript
function anyOther(){
return "otherFunction";
}
function getLocation() {
return window.location.toString();
}
function myFunc(data, func) {
console.log(data, func());
}
myFunc("From", getLocation);
myFunc("From", anyOther);
myFunc("From", window.location.toString);