JSFiddle - React, Tailwind, and code Playground
HTML
<h2>Triva X Ten</h2>
<div id="practice">
<p>Welcome to Triva X Ten, a little diversion from your busy day! You'll be asked 10 quetions, one at a time, and shown 4 possible answers. Click on your choice to answer the question. Each one is worth 5,10, 15 points depending on difficulty. Answer all correctly and you score 100 points! Use the button to start Triva X Ten and move to the next question.</p>
</div>
<p>
<input type="button" id="button" value="Start Trivia">Question:
<input type="text" size="5" id="questionNumber" placeholder="0">Points:
<input type="text" size="5" id="userPoints" name="">Total Score:
<input type="text" size="5" id="totalScore" name="" placeholder="0">
</p>
JavaScript
// users total score
var totalScore = 0;
// count for questions
var count = 0;
// users points
var userPoints = 0;
// users choice
var userChoice = "";
// array for questions
var questions = new Array();
questions[0] = "When is Playstation 4 coming out?";
questions[1] = "Which company makes the Skyline GT-R?";
questions[2] = "What is Canada's longest street?";
questions[3] = "Which famous singer is from Toronto?";
questions[4] = "Which famous singer is from Toronto?";
questions[5] = "Was this a GLITCH?";
questions[6] = "Are you sure?";
questions[7] = "What is the Reason of Life?";
questions[8] = "What was the last answer to the last question?";
questions[9] = "What comes before Lee?";
// array for answers
var answers = new Array();
answers[0] = "November";
answers[1] = "Nissan";
answers[2] = "Younge";
answers[3] = "Drake";
answers[4] = "Drake";
answers[5] = "STAHHP";
answers[6] = "Yes";
answers[7] = "Hope";
answers[8] = "Hope";
answers[9] = "Bruce";
// array for selections
var selections = new Array();
selections[0] = ["November", "December", "June", "March"];
selections[1] = ["Nissan", "Chevy", "BMW", "Mazda"];
selections[2] = ["Younge", "Simcoe", "Dufferin", "Toronto"];
selections[3] = ["Drake", "Usher", "Me", "You"];
selections[4] = ["Drake", "Usher", "Me", "You"];
selections[5] = ["No", "Yes", "STAHHP", "Maybe"];
selections[6] = ["Yes", "No", "Don't Know", "STAHHP"];
selections[7] = ["Live", "Love", "Fun", "Hope"];
selections[8] = ["Live", "Love", "Fun", "Hope"];
selections[9] = ["Bruce", "Chan", "Pong", "Lee"];
// array for points
var points = new Array();
points[0] = [10];
points[1] = [15];
points[2] = [5];
points[3] = [10];
points[4] = [15];
points[5] = [10];
points[6] = [15];
points[7] = [10];
points[8] = [15];
points[9] =...