$(document).ready(function() {
var questionNumber = 0;
var wordNumber = 0;
var questionBank = new Array();
var wordsBank = new Array();
var stage = "#game1";
var stage2 = new Object;
var questionLock = false;
var numberOfQuestions;
var score = 0;
var data = {
"quizlist": [
{
"question": "How much is two plus two?",
"option1": "Four",
"option2": "Five",
"option3": "Two",
}, {
"question": "Selecione a sentença correta",
"option1": "I am a person",
"option2": "I is a person",
"option3": "I are a person",
}, {
"question": "Select the correct form in the interrogative",
"option1": "Are you a student?",
"option2": "Is you a student?",
"option3": "You are a student?",
}, {
"question": "How much is one minus one?",
"option1": "Zero",
"option2": "Two",
"option3": "Four",
}, {
"question": "He / She / It usam o verbo To Be ...",
"option1": "is",
"option2": "are",
"option3": "am",
}, {
"question": "Selecione a frase correta na afirmativa",
"option1": "We are here.",
"option2": "Are we here.",
"option3": "We are not here.",
}, {
"question": "Selecione a forma correta na negativa",
"option1": "He is not here.",
"option2": "He is not here?",
"option3": "He are not here.",
}, {
"question": "You / We / They usam o Verbo To Be ...",
"option1": "are",
"option2": "am",
"option3": "is",
}
]
};
numberOfQuestions = data.quizlist.length;
for (i = 0; i < numberOfQuestions; i++) {
questionBank[i] = [];
questionBank[i].push(data.quizlist[i].question);
questionBank[i].push(data.quizlist[i].option1);
questionBank[i].push(data.quizlist[i].option2);
questionBank[i].push(data.quizlist[i].option3);
}
displayQuestion();
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.