JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://amatiasq.com/fiddle-console.js"></script>

JavaScript

(function(global) {
    var secreto;
    
    function Persona() { }
    Persona.prototype = {
        guardarSecreto: function(susurro) {
            secreto = susurro;
        },
        revelarSecreto: function() {
            return secreto;
        }
    };
    
    global.Persona = Persona;
})(this);

var pepe = new Persona();
var maria = new Persona();
console.log(maria.revelarSecreto());
pepe.guardarSecreto('estás en matrix');
console.log(maria.revelarSecreto());