JSFiddle - React, Tailwind, and code Playground

HTML

<div id='console'></div>

JavaScript

app = function() {

    this.testFunction = function() {
        $('#console').append('<p>2) I am inside of testFunction!</p>');
        this.receiver();

    };

    this.receiver = function() {

        $('#console').append('<p>3) below should be the function name...</p><br /> -------- <br /> <br />');

        var name = this.receiver.caller.toString();
        //var name = this.receiver.caller.name.toString();
        //the above outputs nothing...
        $('#console').append('<p>' + name + '</p>');


        $('#console').append('<br /><br /><p>instead, it seems to be printing the code *inside* of the function...</p>');

    };
};


$(document).ready(function() {

    $('#console').append('<p>1) starting...</p>');
    var t = new app();
    t.testFunction();

});