JSFiddle - React, Tailwind, and code Playground

by VivekVish

HTML

<html>
    <head>
    </head>
    <body>
    </body>
</html>

JavaScript

Object.prototype.getName = function()
    { 
       var funcNameRegex = /function (.{1,})\(/;
       var results = (funcNameRegex).exec((this).constructor.toString());
       return (results && results.length > 1) ? results[1] : "";
    };
    
    function ContentProvider()
    {
           
    }
    
    function LessonProvider()
    {
        console.log(this.getName());
    }
    
    lessonProvider1 = new LessonProvider();
    LessonProvider.prototype = new ContentProvider();
    lessonProvider2 = new LessonProvider();