JSFiddle - React, Tailwind, and code Playground

by jfriend00

HTML

<div id="result"></div>

CSS

#result {font-family: "Courier New";}

JavaScript

var x = function() {};
function y() {}
var results = [];

function isFunction(test) {
  return(Object.prototype.toString.call(test).indexOf("Function") > -1);
}

results.push("typeof x: " + typeof x);
results.push("typeof y: " + typeof y);
results.push("typeof window.setInterval: " + typeof window.setInterval);
results.push("Object.prototype.toString.call(x): " + Object.prototype.toString.call(x));
results.push("$.isFunction(x): " + $.isFunction(x));
results.push("isFunction(x): " + isFunction(x));
results.push("isFunction(results): " + isFunction(results));
$("#result").append(results.join("<br>"));