JSFiddle - React, Tailwind, and code Playground

by James Allardice

JavaScript

var someObj = {
    myMethod: function () {
        alert("My method!");                
    }        
};
        
//You cannot instantiate `someObj`, just like you cannot instantiate `JSON`:
        
var someInstance = new someObj(); //TypeError