JSFiddle - React, Tailwind, and code Playground
HTML
<div id="info"></div>
JavaScript
Object.prototype.typeString = function(){
return Object.prototype.toString.call(this);
};
var type = {
number: 5,
regexp: /foo/,
string: "text",
object: {x:0,y:0},
func: function(){ return ""; }
// bool: true;
}
for(p in type){
if(type.hasOwnProperty(p)){
$("#info").append(p+': '+ type[p].typeString() +"<br>");
}
}