JSFiddle - React, Tailwind, and code Playground

by Michael Prosser

JavaScript

function doSomething(callback){

  if(typeof(callback) == 'function'){

    callback();

  }

}

doSomething(function(){

  console.log("CALLBACK CALLED");

});