JSFiddle - React, Tailwind, and code Playground

by ian_smithz

HTML

<div id="container"></div>
		<h1>Classic Literature Quiz</h1>
		<p>Can you choose the corresponding author and novel for each quotation? Let's see your stuff!</p>
		<div class="question"></div>
		<div class="score"></div>
		<div class="choices"></div>
		<div class="warning"></div>
		<div class="displayButtons">
			<button id="continue" class="button">Continue</button>
		</div>

	</div>

JavaScript

var questions = new Array();
var x = 0;
var score = 0;
var counter = 0;

var questionOne = new questionClass("I know of others who have appearances on their side and are no more faithful or sincere. I knew a man who gave twenty years of his life to a scatterbrained woman, sacrificing everything to her, his friendships, his work, the very respectability of his life, and who one evening recognized that he had never loved her. He had been bored, that's all, bored like most people. Hence he had made himself out of whole cloth a life full of complications and drama. Something must happen - and that explains most human commitments. Something must happen, even loveless slavery, even war or death. Hurray then for funerals!",
	'Jean-Paul Sartre - Nausea','Franz Kafka - The Trial','Albert Camus - The Fall','Jane Austen - Northanger Abbey', 1, 'Albert Camus - The Fall');
	questions.push(questionOne);
var questionTwo = new questionClass("No, I don't like work. I had rather laze about and think of the fine things that can be done. I don't like work - no man does - but I like what is in the work, the chance to find yourself. Your own reality - for yourself, not for others - what no other man can ever know. They can only see the mere show, and never can tells what it really means.",
	'Joseph Conrad - Heart of Darkness','Edmund Husserl - Cartesian Meditations','Simone de Beauvoir - The Mandarins','Ernest Hemingway - The Old Man and the Sea', 2, 'Joseph Conrad - Heart of Darkness');
	questions.push(questionTwo);
var questionThree = new questionClass("I am speaking to those who desire to live and to recapture the honor of their soul. Now that you know the truth about your world, stop supporting your own destroyers. The evil of the world is made possibly by nothing but the sanction you give it. Withdraw your sanction. Withdraw your support. Do not try to live on your enemies' terms or to win at a game where they're setting the rules. Do not seek the favor of those who enslaved you,...