JSFiddle - React, Tailwind, and code Playground

JavaScript

var Shape = function (shape) {
    if( typeof this[shape] == "function" ){
        alert("shape is a prototype function");   
    }
};
Shape.prototype.quad = function(){};

var c = new Shape("circle");
var q = new Shape("quad");