JSFiddle - React, Tailwind, and code Playground
by danShumway
JavaScript
//An alternative to the "new" keyword.
//My Thing method.
function MakeThing() {
this.property = "data";
}
//Make a blank object.
myObject = {};
//Call the constructor in the proper scope.
MakeThing.call(myObject);
//Everything works correctly.
alert(myObject.property);