JSFiddle - React, Tailwind, and code Playground

by Travis Harris

HTML

<div id='the_doc'>test</div>

JavaScript

var final_string = '';
function append(string){
    final_string += string;
}
function write(){
    console.log(final_string);
    console.log(document.getElementById('the_doc').innerHTML);
    document.getElementById('the_doc').innerHTML = final_string;
}
function Movie(title, genre, rating, price, img) {
	this.title = title;
	this.genre = genre;
	this.rating = rating;
	this.price = price;
	this.image = img;
	this.display = function(Infomovie){
		append("<blockquote class='Informovieblock'><h3 class='infomoviett'>Title:</h3><p class='Informovie'>" + Infomovie.title + "</p><br>");
		append("<h3 class='infomoviett'>Genre:</h3><p class='Informovie'>" + Infomovie.genre + "</p><br>");
		append("<h3 class='infomoviett'>Rating:</h3><p class='Informovie'>" + Infomovie.rating + "</p><br>");
		append("<h3 class='infomoviett'>Price:</h3><p class='Informovie'>" + Infomovie.price + "</p></blockquote><br>");
		append("<span><IMG float:'center' SRC='" + Infomovie.image + "' style='width:138px; height:158px;'>" + "<BR><BR>");
	}
}
var Categories = {
	action:[],
	fiction:[],
	animation:[]
};
Categories.action.push(new Movie("Avengers the age of Ultron", "Action", "8.0/10.0", "$7.50", "Labs_Images/Avg_Ultron.jpg"));
Categories.action.push(new Movie("Mission Impossible: Rogue Nation", "Action", "7.5/10.0", "$8.99", "Labs_Images/Avg_Ultron.jpg"));
Categories.action.push(new Movie("Spectre", "Action", "7.1/10.0", "$9.99", "Labs_Images/Avg_Ultron.jpg"));

//spacer ScienceFiction
Categories.fiction.push(new Movie("Mad Max: Fury Road",  "Fiction", "8.2/10.0", "$8.99", "Labs_Images/MM_road.jpg"));
Categories.fiction.push(new Movie("Jurassic World", "Fiction", "7.1/10.0", "$7.59", "Labs_Images/Avg_Ultron.jpg"));
Categories.fiction.push(new Movie("Pixels", "Fiction", "5.7/10.0", "$7.00", "Labs_Images/Avg_Ultron.jpg"));

//spacer Animation
Categories.animation.push(new Movie("Inside Out", "Animation", "8.4/10.0", "$8.70", "Labs_Images/Avg_Ultron.jpg"));
Categories.animation.push(new...