JSFiddle - React, Tailwind, and code Playground

by amatiasq

HTML

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

JavaScript

function Impresora() {
    var a = "Privada!";
    
    // This es el objeto que éste constructor está creando
    this.probando = function() {
        console.log("Intentando acceder desde un método usando 'this.a': " + this.a);
        console.log("Intentando acceder desde un método usando 'a': " + a);
    };
}

var temp = new Impresora();
temp.probando();