JSFiddle - React, Tailwind, and code Playground

JavaScript

var correct = 0; 
var answer1 = prompt("Which programming language has the name of a gem?"); 
if (answer1.toUpperCase() === "RUBY") { correct += 1; } 

var answer2 = prompt("What is the best programming language?"); 
if (answer2 === "JavaScript") { correct += 1; } 

var answer3 = prompt("Java is the same as JavaScript, true or false?"); 
if (answer3.toUpperCase() === "FALSE") { correct += 1; } 

var answer4 = prompt("We use the........... dialogue to collect user input."); 
if (answer4.toUpperCase() === "PROMPT") { correct += 1; } 

var answer5 = prompt("In comparison operators, a number is less than a letter, true or false"); if (answer5.toUpperCase() === "TRUE") { correct += 1; }

document.write("You got " + correct + " out of 5 questions");