JSFiddle - React, Tailwind, and code Playground

JavaScript

var house = 'var hl = 100; this.create = function(){ return hl; }';
            
            function require(string){
               var result=null;
               result=new Function(' return '+string);
               
               if(result) {
                  try {  
                     /** @var proto - ОБЩИЙ ПРОТОТИП ДЛЯ ВСЕХ ОБЪЕКТОВ*/;
                   
                      result.prototype=proto;
                      result=new result();
                  } catch( e) {
                      console.log('Oops!', e);
                      result=false;
                  }
               }
               return result;
            }
            
            var bi = require(house)
            
            console.log(bi)