How To Make Quiz App Using JavaScript | Build Quiz App With HTML CSS & JavaScript

How To Make Quiz App Using JavaScript | Build Quiz App With HTML CSS & JavaScript

GreatStack

1 год назад

390,690 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

QUule Pio
QUule Pio - 20.11.2023 11:28

Awesome job😮, thanks, 🎉❤🫶🏻

Ответить
Suvam Debnath
Suvam Debnath - 16.11.2023 10:23

I am facing a problem. I have a quiz app with 10 questions but only four is showing (No.1,2,4,7)plz help me to fix the issue

Ответить
barenya binayak
barenya binayak - 14.11.2023 11:48

Thanks 🙏

Ответить
Zareel Kalam
Zareel Kalam - 13.11.2023 09:38

Thank you..

Ответить
Ashok Neupane
Ashok Neupane - 11.11.2023 15:01

best of the best video. keep making such nice videos. I am gonna pay another 5 dollars for another project.

Ответить
Baboo Kumar Heerani
Baboo Kumar Heerani - 08.11.2023 19:23

amazing

Ответить
Eliseo Ortega Correa
Eliseo Ortega Correa - 06.11.2023 21:31

Great!

Ответить
Salwa Talitha Zahrani
Salwa Talitha Zahrani - 06.11.2023 02:17

How to add image to to the quiz?

Ответить
TASIN MUHAIMINUL
TASIN MUHAIMINUL - 05.11.2023 22:08

whats about the resetState() function?? i'ts not working properly..

Ответить
Rudy Thorns
Rudy Thorns - 02.11.2023 06:33

this video struck an idea for me I am going to use a quiz and trivia page based on my own niche and maybe make money out of it --ill go ahead and consider making my own quiz app soon tnks

Ответить
Anz Khan
Anz Khan - 31.10.2023 21:51

Thanks you Avinash sir
..... Done

Ответить
Anz Khan
Anz Khan - 31.10.2023 20:56

Where is Source code ?

Ответить
AmbiLee
AmbiLee - 31.10.2023 16:57

Somehow I did all you did, but my color is not setting when pressing the button, also somehow my eventlistner has an issue. dont know how to fix ist.

Ответить
Research Channel
Research Channel - 30.10.2023 18:47

Hey, can you adjust something like for math quiz?

Ответить
Yuvi
Yuvi - 30.10.2023 15:07

Outstanding Tutorial keep it up bro ✨

Ответить
Venkata Bhargav
Venkata Bhargav - 30.10.2023 10:11

over all good but js part was confusing

Ответить
Areesha Fatima
Areesha Fatima - 29.10.2023 20:45

function showScore() is not working as a statement is printed not show score number ${questions.length} printed not number.

Ответить
Meta Multi Tool
Meta Multi Tool - 24.10.2023 22:21

thank you

Ответить
xyz shoaib
xyz shoaib - 24.10.2023 20:02

I copied the whole code perfectly but it doesn't work someone please help me 😥😢😭

Ответить
xyz shoaib
xyz shoaib - 23.10.2023 16:39

someone give me the source code ? please 🥹🥹

Ответить
Kim
Kim - 21.10.2023 13:27

21 oct 23

Ответить
Leng Wan
Leng Wan - 21.10.2023 10:42

Thank you so much. I watched this for reference to create my portfolio .so helpful

Ответить
Aaravi Sinha
Aaravi Sinha - 20.10.2023 15:36

Thank you so much sir for this useful video 🙏🙏

Ответить
Soni Kumari
Soni Kumari - 20.10.2023 11:53

Bro, You are awesomeeeeeeeeeeee.......☺☺☺🤗.Stay focused

Ответить
Sud_ Chandra
Sud_ Chandra - 19.10.2023 22:30

can anyone explain where did he get the target ? selectAnswer(e){
e. target

Ответить
Sheldon Roy
Sheldon Roy - 17.10.2023 23:57

Hello, I am attempting to use this java script quiz on a local server, more specifically XXAMP. The application works properly when opening the html file directly to google but when going through the local host on a web browser the application doesn't properly change questions and the play again button doesn't properly work. Does anyone have any insight as to what might be the issue and how to fix it?

Ответить
Jamaal Amedee
Jamaal Amedee - 17.10.2023 04:03

AWESOME JOB BRO!

Ответить
Spidey Gaming
Spidey Gaming - 16.10.2023 17:08

I don't know how to thank this guy ❤ Next level ! easiest explanation .... if you are a beginner and want to enhance your skillset on JS follow this guy man

Ответить
Cathy Don
Cathy Don - 15.10.2023 20:47

thank you! This was very helpful and I learnt a lot!

Ответить
CAPTAIN YI
CAPTAIN YI - 11.10.2023 12:48

very nice tutorial

Ответить
Target:500 Million traders & Investors
Target:500 Million traders & Investors - 11.10.2023 11:54

the tutorial is great and awesome

Ответить
Target:500 Million traders & Investors
Target:500 Million traders & Investors - 11.10.2023 11:54

HTML,CSS part is seems easy, but I felt so difficult in javascript part. Kindly give tutorial on whole javascripts concepts you have used in here, 30 days js projects and other projects too. Please so helpful to undestand the concept and get the job

Ответить
iam weirdo
iam weirdo - 10.10.2023 22:14

javascript does not working :(

Ответить
Sangeetsargam Sagar
Sangeetsargam Sagar - 10.10.2023 12:58

here is an easier version:
<body>
<div class="container">
<h1>Quiz App</h1>
<div class="question" id="question"></div>
<div class="options" id="options"></div>
<div id="score">Score: 0</div>
</div>

<script>
const questions = [
{
question: "What is the capital of France?",
options: ["Paris", "London", "Berlin", "Madrid"],
answer: "Paris"
},
{
question: "Which planet is known as the Red Planet?",
options: ["Earth", "Mars", "Venus", "Jupiter"],
answer: "Mars"
},
{
question: "What is the largest mammal in the world?",
options: ["Elephant", "Giraffe", "Blue Whale", "Hippopotamus"],
answer: "Blue Whale"
},
{
question: "What is the chemical symbol for gold?",
options: ["Go", "Au", "Ag", "Ge"],
answer: "Au"
}
];

let currentQuestionIndex = 0;
let score = 0;

const questionElement = document.getElementById('question');
const optionsElement = document.getElementById('options');
const scoreElement = document.getElementById('score');

function displayQuestion() {
const currentQuestion = questions[currentQuestionIndex];
questionElement.textContent = currentQuestion.question;
optionsElement.innerHTML = '';

currentQuestion.options.forEach((option, index) => {
const button = document.createElement('button');
button.textContent = option;
button.addEventListener('click', () => checkAnswer(option));
optionsElement.appendChild(button);
});
}

function checkAnswer(selectedOption) {
const currentQuestion = questions[currentQuestionIndex];
if (selectedOption === currentQuestion.answer) {
score++;
}

currentQuestionIndex++;

if (currentQuestionIndex < questions.length) {
displayQuestion();
} else {
showResult();
}
}

function showResult() {
questionElement.textContent = 'Quiz Completed!';
optionsElement.innerHTML = '';
scoreElement.textContent = `Your Score: ${score} / ${questions.length}`;
}

displayQuestion();
</script>
</body>

Ответить
Vishal Mishra
Vishal Mishra - 07.10.2023 20:57

Javascript page is not working anymore help me and solve my Query
If i tru so many times last 5 hour's i try to fix the code but not get the solution, if any have source code please provide it @Greatstuck please reply

Ответить
samna sial
samna sial - 07.10.2023 20:43

Aap dikhaty kuch hain or jub hum try karty hain to hota kuch or h

Ответить
Vinícius Borges
Vinícius Borges - 07.10.2023 15:42

link of github?

Ответить
Poonam Rathod
Poonam Rathod - 02.10.2023 13:55

Source code please

Ответить
Mathi maha
Mathi maha - 30.09.2023 09:15

Please give the source code of this project

Ответить
Gavin W
Gavin W - 27.09.2023 20:50

Question, how did you change the default font color of your code in VS code? My JS colors are looking different than the colors displayed here, and I really like the colors you have compared to my own.

Ответить
RAJ ACADEMY
RAJ ACADEMY - 27.09.2023 06:39

Sir I have a doubt if I wants to add approx 10x questions then how to make data base in this type of application

Ответить
daev zandil
daev zandil - 26.09.2023 20:47

Hooray I did it

Ответить
Henry Herrera
Henry Herrera - 26.09.2023 02:26

Great short course! :D

Ответить
08-Hannah 8A
08-Hannah 8A - 25.09.2023 17:20

Please the app used for this fast.

Ответить
Saquib Ahmad
Saquib Ahmad - 24.09.2023 18:01

Your tutorial is awesome. Pls upload source code of project too.

Ответить
Victory Nruama
Victory Nruama - 23.09.2023 00:48

The answers doesn't add up

Ответить
milonjyoti
milonjyoti - 22.09.2023 17:47

My html and script code are not link . I don't know what is the problem?

Ответить
Samarth Sharma
Samarth Sharma - 22.09.2023 17:38

what is the work of button.dataset.correct here

Ответить
The Bharatiya
The Bharatiya - 21.09.2023 10:57

in answer Button this shows undefined 🆘❗⚠

Ответить
Alex
Alex - 20.09.2023 22:34

I love your videos so much!!! You have been teaching me so well and I can't thank you enough.

Ответить