JSFiddle - React, Tailwind, and code Playground

JavaScript

"use strict"; 

var obj = {
    foo: "foo1"
};

var ClassFoo = function () {
	this.foo = 'bar';
  this.bar = 'foo';
};

Object.freeze(obj);

var constFoo = Object.freeze(new ClassFoo());

//All of the following will fail, and result in errors in strict mode
obj.foo = "foo2"; //cannot change values
obj.bar = "bar"; //cannot add a property
delete obj.bar; //cannot delete a property
//cannot call defineProperty on a frozen object
Object.defineProperty(obj, "foo", {
    value: "foo2"
});