Some Rules of this Quiz
1. You will have only 20 seconds per each question.
2. Once you select your answer, it can’t be undone.
3. You can’t select any option once time goes off.
4. You can’t exit from the Quiz while you’re playing.
5. You’ll get points on the basis of your correct answers.
Flow Control Quiz
Time Left
20
 
 
You’ve completed the Quiz!

Related Quizzes

' + '
'+ questions[index].options[1] +'
' + '
'+ questions[index].options[2] +'
' + '
'+ questions[index].options[3] +'
'; que_text.innerHTML = que_tag; //adding new span tag inside que_tag option_list.innerHTML = option_tag; //adding new div tag inside option_tag const option = option_list.querySelectorAll(".option"); // set onclick attribute to all available options for(i=0; i '; let crossIconTag = '
'; //if user clicked on option function optionSelected(answer){ clearInterval(counter); //clear counter clearInterval(counterLine); //clear counterLine let userAns = answer.textContent; //getting user selected option let correcAns = questions[que_count].answer; //getting correct answer from array const allOptions = option_list.children.length; //getting all option items if(userAns == correcAns){ //if user selected option is equal to array's correct answer userScore += 1; //upgrading score value with 1 answer.classList.add("correct"); //adding green color to correct selected option answer.insertAdjacentHTML("beforeend", tickIconTag); //adding tick icon to correct selected option console.log("Correct Answer"); console.log("Your correct answers = " + userScore); }else{ answer.classList.add("incorrect"); //adding red color to correct selected option answer.insertAdjacentHTML("beforeend", crossIconTag); //adding cross icon to correct selected option console.log("Wrong Answer"); for(i=0; i 8){ // if user scored more than 3 //creating a new span tag and passing the user score number and total question number let scoreTag = 'and congrats! , You got'+ userScore +' out of '+ questions.length +''; scoreText.innerHTML = scoreTag; //adding new span tag inside score_Text let passIcon = ''; resultIcon.innerHTML = passIcon; } else if(userScore and sorry, You got only'+ userScore +' out of '+ questions.length +''; scoreText.innerHTML = scoreTag; let failIcon = ''; resultIcon.innerHTML = failIcon; } else{ // if user scored less than 1 let scoreTag = 'and nice , You got'+ userScore +' out of '+ questions.length +''; scoreText.innerHTML = scoreTag; let passIcon = ''; resultIcon.innerHTML = passIcon; } } function startTimer(time){ counter = setInterval(timer, 1000); function timer(){ timeCount.textContent = time; //changing the value of timeCount with time value time--; //decrement the time value if(time 649){ //if time value is greater than 549 clearInterval(counterLine); //clear counterLine } } } function queCounter(index){ //creating a new span tag and passing the question number and total question let totalQueCounTag = ''+ index +' of '+ questions.length +' Questions'; bottom_ques_counter.innerHTML = totalQueCounTag; //adding new span tag inside bottom_ques_counter }