JSFiddle - React, Tailwind, and code Playground

JavaScript

var buttons_top = 0;
var buttons_top_padding = 5;
var buttons_height = 50;

function MakeBindObject()
{
	var myObj = {};
	myObj.report_box = document.createElement('div');
	myObj.report_box.style.position = 'absolute';
	myObj.report_box.style.top = (buttons_top + buttons_top_padding) + 'px';
	myObj.report_box.style.left = '0px';
	myObj.report_box.style.width = '150px';
	myObj.report_box.style.height = buttons_height + 'px';
	myObj.report_box.style.border = '1px solid black';
	myObj.report_box.style.textAlign = 'center';
	myObj.report_box.style.lineHeight = '50px';
	document.body.appendChild(myObj.report_box);

	myObj.clicker = document.createElement('button');
	myObj.clicker.style.position = 'absolute';
	myObj.clicker.style.top = (buttons_top + buttons_top_padding) + 'px';
	myObj.clicker.style.left = '170px';
	myObj.clicker.style.width = '130px';
	myObj.clicker.style.height = buttons_height + 'px';
	myObj.clicker.style.border = '1px solid black';
	myObj.clicker.style.textAlign = 'center';
	myObj.clicker.style.lineHeight = '50px';
	myObj.clicker.innerHTML = "Clicked 0 Times";
	document.body.appendChild(myObj.clicker);

	buttons_top += buttons_height + buttons_top_padding;
	
	myObj.text_even = "Hello World!";
	myObj.text_odd = function()
    {
        return "Click Count: " + this.click_count;
    }.bind(myObj);
    
	myObj.click_count = 0;

	myObj.print_text = function(key)
	{
		if(!key)
			key = this.text_even;
		
        if(typeof this[key] === 'function')
		    this.report_box.innerHTML = this[key]();
        else
		    this.report_box.innerHTML = this[key];
        
		myObj.clicker.innerHTML = "Clicked " + this.click_count + " Time";
		
		if(this.click_count > 1)
			myObj.clicker.innerHTML += "s"
	}.bind(myObj);

	myObj.click_capture = function()
	{
		this.click_count++;
		this.isEven = function(num)
		{
			return (num % 2) === 0 ? true :...