JSFiddle - React, Tailwind, and code Playground

JavaScript

function checkForAnAnonymousConstructor(o) {
    for(var f in window) {
        if(window[f] == o.constructor) return f;    
    }
}

me = function() { }
var you = new me();
console.log(checkForAnAnonymousConstructor(you)); // -> me

me = 10
console.log(checkForAnAnonymousConstructor(you));// -> undefined