JSFiddle - React, Tailwind, and code Playground

by Pablo Leone

HTML

<div id="showProperties"></div>

JavaScript

var ObjectDemo = function (params) {

    this.properties = null;

    this.construct = function (constructParams) {
        if (typeof constructParams === 'object') {
            this.properties = constructParams;
        }
    };

    this.construct(params);
};

var ObjectInstance = new ObjectDemo({
    main: 'hello'
});

$('#showProperties').html(JSON.stringify(ObjectInstance.properties));