JSFiddle - React, Tailwind, and code Playground

by wooozy

HTML

<h1>
Assignment 11
</h1>
<input type="button" value="Calculate" onclick="buildTree()" /><br>
Enter x:<input type="text" id="x" /><br>
Enter y:<input type="text" id="y" /><br>
<p id="value1"></p>
<p id="value2"></p>
<p id="value3"></p>
<p id="value4"></p>

CSS

var TNode = function(_content) {  this.left = null;  this.right = null;}

TNode.prototype.isLeaf = function() {
  if (isLeaf == NULL)
     return true;
     }
     
  else {
  if (isFull == NULL)
  return false;

JavaScript

var TNode = function(_content) {  this.left = null;  this.right = null;}
TNode.prototype.isLeaf = function() {

var true = new 	TNode(_content);
true.parent = this;
this.left = true;
return true;
}
TNode.prototype.isFull = function() {
var false = new TNode(_content);
false.parent = this;
this.right = false;
return false;
}

if (n == NULL)
    return true;
    
    
    
    
 var TNode = function(_content) {  this.left = null;  this.right = null;}
TNode.prototype.isLeaf = function() {

var true = new 	TNode(_content);
true.parent = this;
this.left = true;
return true;
}
TNode.prototype.isFull = function() {
var false = new TNode(_content);
false.parent = this;
this.right = false;
return false;
}

if (n == NULL)
    return true;
    
    
    
    
   buildNode.prototype.nodeL = function (_content){
	var n = new buildNode(_content);
  n.parent = this;
  this.left = n;
  return n;
}


var TNode = function(_content) {  this.left = null;  this.right = null;}

TNode.prototype.isLeaf = function() {
  if (isLeaf == NULL)
     return true;
     }
 TNode.prototype.isFull = function() {    
  else {
  if (isFull == NULL)
  return false;