JSFiddle - React, Tailwind, and code Playground

by fhcj2

HTML

<div id="realPlainObject"></div>
<div id="notPlainObject"></div>
<div id="notPlainObjectMistaken"></div>

JavaScript

var MyClass = function(){
    this.name = arguments[0];
    this.number = 7;
};

$(document).ready(function() {
    var notPlainObject = new MyClass("My Name");
    var realPlainObject = new Object();
    realPlainObject.testMe = 8;
    $("#realPlainObject").text($.isPlainObject(realPlainObject));
    $("#notPlainObject").text($.isPlainObject(notPlainObject));
    notPlainObject.constructor = 154;
    $("#notPlainObjectMistaken").text($.isPlainObject(notPlainObject));
});