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

Поділитися
Вставка
  • Опубліковано 7 січ 2025

КОМЕНТАРІ • 495

  • @GreatStackDev
    @GreatStackDev  3 місяці тому +4

    👉 My JavaScript Advanced Course: greatstack.dev/go/javascript-course (75% Discount)

  • @balloney2175
    @balloney2175 Рік тому +61

    Avinash is a true programmer. He knows well every corner of Javascript. Kudos!

  • @pankajmandal7204
    @pankajmandal7204 4 місяці тому +16

    i completed three projects from this playlist projects are good but please its a request to please also explain the javascript code properly it will be great if you explain in detail for javascript codes because it gets hard for freshers

  • @rudythorns8411
    @rudythorns8411 Рік тому +8

    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

  • @yashchoudhary9789
    @yashchoudhary9789 Місяць тому +3

    Thanks Bro ☺️
    I learned a lot
    This is my first project with Javascript..

  • @knowledgebook7809
    @knowledgebook7809 Рік тому +8

    Can't explain how far you have helped me......!!
    Even chatGPT was not able to solve my problem but you did....!!

    • @AibekJustForStudy
      @AibekJustForStudy 8 місяців тому +1

      What was the problem?

    • @knowledgebook7809
      @knowledgebook7809 8 місяців тому +1

      @@AibekJustForStudy Thanks for asking but I don't remember right now because I posted this comment 1 year back 😅

  • @awmdanger9677
    @awmdanger9677 6 днів тому +1

    Thank you sir. I did this one in 3 hours, 1 hour less than the previous project. Thanks for these projects ♥️

  • @isamsvideoediting4572
    @isamsvideoediting4572 Рік тому +23

    Avinash, You are a hero. You make coding very easy for me to learn. Thank you.

  • @jengainavyotakiwa
    @jengainavyotakiwa Рік тому +23

    You are a teacher, your code is clear, your way of teaching is making us easy understand the codes.

    • @xMahesh
      @xMahesh Рік тому +2

      Bro I need this code

  • @patrickbanda3585
    @patrickbanda3585 Рік тому +60

    Awesome lesson. For upcoming tutorials please use live server split the screen into two parts, one side show the code and on the other let us see the live render so we see the changes in real time throughout the tutorials. Keep up the good work.

  • @babarshabbir2554
    @babarshabbir2554 7 місяців тому +4

    "Excellent tutorial! Clear instructions for building a quiz app with HTML, CSS, and JavaScript. Highly recommended."

    • @ankitpradhan2499
      @ankitpradhan2499 7 місяців тому +2

      Is the code working or not...like if i coded along the video ??

    • @RayquanRogers
      @RayquanRogers 4 місяці тому +1

      What’s the quotes for? I’m assuming it didn’t work for you?

  • @beardedraider4751
    @beardedraider4751 Рік тому +8

    You have no idea how much this has helped me! Thank you!

  • @spideygaming5103
    @spideygaming5103 Рік тому +19

    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

  • @efuentesjr
    @efuentesjr 8 місяців тому +2

    It'd be nice if this had (1.) Questions number limit, meaning if I have 100 questions end each session at 50 and (2.) shuffle questions function... Other than that AWESOME training video! Thanks.

  • @sbndBhanu546
    @sbndBhanu546 5 місяців тому +6

    please also tell how to put timer for each question,
    atlast how to put a pie chart which notices how many are correct in green and wrong as red Please provide tutorials

  • @rajavigneshwaran9978
    @rajavigneshwaran9978 4 дні тому

    I don't have a words to describe your teaching style and the efforts you have put just awesome, your way of teaching projects is very understoodable and clear. Because of you only i am able to create frontend projects....
    Thank you so much....❤

  • @rutujashirke2428
    @rutujashirke2428 11 місяців тому +3

    Next Level Javascript literally

  • @babarshabbir2554
    @babarshabbir2554 7 місяців тому +4

    "Excellent quiz app tutorial! Clear explanations and easy-to-follow steps using HTML, CSS, and JavaScript."

    • @RayquanRogers
      @RayquanRogers 4 місяці тому +2

      Why’d you post the same thing twice?

  • @meenakshimeeen
    @meenakshimeeen 5 місяців тому +2

    you are doing great job... thank you so much

  • @therio6637
    @therio6637 Рік тому +5

    Congratulations for 800k 😁🔥🔥🔥🔥🔥

  • @AbdullohMulkamonov
    @AbdullohMulkamonov Рік тому +2

    This channal the best in You tube. Thank you for Video.

  • @victoriatamunowari2400
    @victoriatamunowari2400 Рік тому +1

    Coming from someone who has been frustrated..Thank you So mmuch, This was really helpful, was what I needed

  • @ngnko
    @ngnko Рік тому +2

    Thanks a lot from Uzbekistan! I have leaned a lot from your projects :)

  • @VideosViraisVirais-dc7nx
    @VideosViraisVirais-dc7nx 4 місяці тому +17

    The video has 30 minutes, But it took me 2 hours to complete. No errors or bugs ...

    • @GreatStackDev
      @GreatStackDev  4 місяці тому +12

      That's okay. It take time to complete. Keep learning.

    • @Ankitp8
      @Ankitp8 2 місяці тому

      Can you give me Source code please?

    • @RadwanBenmoussa-n6t
      @RadwanBenmoussa-n6t 2 місяці тому

      It took me 2 day and I'm not finished .I don't know but I think he made it hard in the code

    • @syedshahed3662
      @syedshahed3662 Місяць тому

      Bhai can you send code

  • @mayuriagale7488
    @mayuriagale7488 4 місяці тому +2

    Thank you so much ❤❤ It worked🤗🤗🤗

    • @GreatStackDev
      @GreatStackDev  4 місяці тому

      You're welcome. 😊 Keep coding.

    • @Ankitp8
      @Ankitp8 2 місяці тому

      Please give me source code 🙏🏻

    • @Ankitp8
      @Ankitp8 2 місяці тому

      Because mine only shows answers 1 2 3 4 ...
      So please give me source code

  • @venkatesh87689
    @venkatesh87689 9 місяців тому +1

    Thank you bro it helps me lot
    I successfully executed quiz website

  • @lesterdimitresque6315
    @lesterdimitresque6315 8 місяців тому +2

    thank you brother , your tutorials are clear and simple , great job ! subscribed

  • @sureshd2555
    @sureshd2555 Рік тому +2

    Thanks for ur best teaching sir. ❤😊

  • @SamsonA14
    @SamsonA14 6 місяців тому +2

    This tutorial has helped me so much. Thank you, I'm now a subscriber and will be practising my javascript skills with your 30day JS code playlist.

    • @Kalicharan-tu6kr
      @Kalicharan-tu6kr 5 місяців тому +1

      Your java script part runs ?? mine js part does not making any changes why T_T??

  • @Pipo0511
    @Pipo0511 Рік тому +2

    A big salute for you sir 🙇
    Thank you so much ..
    I have learned a lot of things today

  • @sravansai8990
    @sravansai8990 5 місяців тому +1

    Nice explanation sir and easy to understand keep going 😊...

    • @GreatStackDev
      @GreatStackDev  5 місяців тому +1

      Thanks a lot 😊 Keep coding.

  • @Cheetohzz
    @Cheetohzz Рік тому +3

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

  • @tauraimashambanhaka9458
    @tauraimashambanhaka9458 Рік тому +6

    Thank you for this Easy Tutorial. Please keep creating more JavaScript tutorials. The way you simplify code is amazing, keep up the good work.

  • @SamuelMaiva
    @SamuelMaiva Рік тому

    Nice video ,,,you made me to have no fear in JavaScript again.... thanks a lot

  • @harismalik4330
    @harismalik4330 5 місяців тому +1

    Very Helpful and learned new things also

  • @SoniKumari-yn3lp
    @SoniKumari-yn3lp Рік тому

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

  • @fransmoemi9707
    @fransmoemi9707 5 місяців тому +1

    Thank you very much Sir🙏

    • @GreatStackDev
      @GreatStackDev  5 місяців тому

      Glad you liked it. You are welcome! 😊

  • @AsimAliKhan-h3c
    @AsimAliKhan-h3c Рік тому +2

    Your videos are really helpful, only thing I need to mention is when you are writing code please explain it also, dont say this format or code, explain it instead

  • @alexandrabernard7548
    @alexandrabernard7548 11 місяців тому

    Merci pour tout, ce fût si facile avec vous. Very, very, very good

  • @kirankharsel2368
    @kirankharsel2368 11 місяців тому

    ❤❤ simple, easy to understand project.. thanks

    • @doremon3692
      @doremon3692 9 місяців тому

      really you understand this r just copy the code

  • @kingharji9170
    @kingharji9170 3 місяці тому

    Amazing work brother!

  • @LuisMedina-dk3vc
    @LuisMedina-dk3vc Рік тому

    Thank you so much. You're channel is so good.

  • @shuaibakhtar5333
    @shuaibakhtar5333 5 місяців тому

    Really helpful sir.....Thankyou so much for your efforts...

  • @Spartak_88_
    @Spartak_88_ 13 днів тому

    Thank you Man 👍🏻

  • @dadashussein
    @dadashussein Рік тому +8

    I want to add shuffle function
    const shuffleAnswers = (answers) => {
    for (let i = answers.length - 1; i > 0; i--) {
    const j = Math.floor(Math.random() * (i + 1));
    [answers[i], answers[j]] = [answers[j], answers[i]];
    }
    }

    • @philippschonherr
      @philippschonherr 8 місяців тому +2

      Hi! Where in the source code do I have to insert this?

  • @lengwan8973
    @lengwan8973 Рік тому

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

  • @mahesh_bvn
    @mahesh_bvn Місяць тому

    Well explained, thanks!

  • @yuvi6930
    @yuvi6930 Рік тому

    Outstanding Tutorial keep it up bro ✨

  • @Shabeerapatan
    @Shabeerapatan 5 місяців тому

    Thank you so much , next level of explanation sir

  • @BinamLuitel
    @BinamLuitel Рік тому +2

    thank you very much sir
    your explanation is so clear

  • @faresta4ua
    @faresta4ua Рік тому

    you are the greet teacher in my learning process

  • @diogodias_
    @diogodias_ Рік тому

    omg thaaaanks, i learning so mutch here, and you help-me with my project!

  • @anzkhan646
    @anzkhan646 Рік тому +1

    Thanks you Avinash sir
    ..... Done

  • @crazy_lovers_zditz9986
    @crazy_lovers_zditz9986 Рік тому +2

    I follow up the whole code It really worked ......but I am unable to run the Java script yar ...... please suggest a solution ...yar
    Only script is not showing over the app other work too fluently.
    After rechecking the .....i Got the whole concept 😍😍😍 thanksss a lot for teaching this much easy way n perfectly.I really made it .😁best way uhh were teaching

    • @bhoomikasn5094
      @bhoomikasn5094 Рік тому

      same here script is not showing what is the issue can please tell me

    • @vinitkumarparmar1339
      @vinitkumarparmar1339 11 місяців тому

      @@bhoomikasn5094 make sure you import the js in html code at bottom

    • @deepanshisinghal719
      @deepanshisinghal719 2 місяці тому

      i am facing same problem

  • @aaravisinha3874
    @aaravisinha3874 Рік тому

    Thank you so much sir for this useful video 🙏🙏

  • @SMD-28-y7p
    @SMD-28-y7p 9 місяців тому +3

    00:04 Create a JavaScript quiz app using HTML, CSS, and JavaScript
    02:26 Created HTML and CSS files for a quiz app
    08:07 Creating buttons with CSS styling and hover effect
    11:14 Add JavaScript to hide/show buttons and connect script file with HTML
    17:55 Displaying question and answers in HTML using JavaScript
    20:36 Start quiz
    26:10 Adding functionality to the website to highlight correct and wrong answers
    28:36 Add hover effect and cursor change when button is disabled
    34:06 You can create your own quiz app or quiz website using HTML, CSS, and JavaScript.
    Crafted by Merlin AI.

  • @cathydon779
    @cathydon779 Рік тому

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

  • @MagicocoCoding-uj6mp
    @MagicocoCoding-uj6mp 8 місяців тому

    Amazing work, thanks so much

  • @orangeapple681
    @orangeapple681 10 місяців тому +1

    Also got another question about JS syntax. Why would you code something such as
    correct: false
    correct: true
    vs
    true: no
    false: yes
    or
    true: 1
    true: 0
    false: 1
    false: 0
    I guess, why would one syntax be the ultimately correct way vs other ways? It makes coding look more like rote memorization vs a logical process.

  • @marianobarella3191
    @marianobarella3191 11 місяців тому +1

    This is exactly what I was looking for, and you made it so simple! Thank you so much!

  • @simpleomiii3660
    @simpleomiii3660 Рік тому +1

    hello sir , your video are really helpful and your voice is very good i'm lot of learn in your video ..keep creating new design and hover , animation effect

  • @kevindong4303
    @kevindong4303 Рік тому

    Thank you! Informative and easy to follow!

  • @harjyotsinghgulati6603
    @harjyotsinghgulati6603 7 місяців тому +1

    I have learned to much things from this video

  • @jerryudochu3496
    @jerryudochu3496 9 місяців тому

    Wonderful tutorial. Simple and easy to follow. Can you please show me how to save the quiz in local storage and reset the local storage when you restart the quiz

  • @lakshyarajdash
    @lakshyarajdash Рік тому +1

    I've made one myself.. but tbe design is awesome

  • @sanikadeokule3545
    @sanikadeokule3545 10 місяців тому

    Amazing! thank you so much

  • @soydanhakan10
    @soydanhakan10 10 місяців тому

    Thank you so much teacher :)

  • @SADDAMKHAN-tv7ro
    @SADDAMKHAN-tv7ro 6 місяців тому +3

    New viewers k liye aik guide
    A "question" property (string)
    An "answer" property (array of objects)
    A "text" property (string)
    A "correct" property (boolean)

  • @قلعةالعلم-ع8د
    @قلعةالعلم-ع8د 11 місяців тому

    thank you from Istanbul/turkey

  • @d.lindstrom7130
    @d.lindstrom7130 8 місяців тому

    I also want to say thank you very much!

  • @sangeetsargamsagar4639
    @sangeetsargamsagar4639 Рік тому +36

    here is an easier version:

    Quiz App


    Score: 0


    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();

    • @sambasow2816
      @sambasow2816 Рік тому +1

      Hello

    • @deepakwaghmare3406
      @deepakwaghmare3406 5 місяців тому +2

      doing this project today og

    • @pedropimenta896
      @pedropimenta896 4 місяці тому +3

      This is very nice, but it makes long answers verbose on the code. The code will have the answer written twice, every time.

    • @PeaceAlbert-o7k
      @PeaceAlbert-o7k Місяць тому +1

      Thanks a lot but can you help drop code for the admin dashboard that can be used to update questions to the website for a school

  • @bendillolj8756
    @bendillolj8756 Рік тому

    thankyou this is a big help for me!

  • @juatv777
    @juatv777 Рік тому +2

    Amazing Lesson. My only problem is why the quiz does not work even after writing it correctly.

    • @ankurprasad
      @ankurprasad 11 місяців тому +1

      Same here dude ......
      if u get the perfect One . Will u share to the Comment ??

    • @fahmimfs4134
      @fahmimfs4134 11 місяців тому +1

      same here. My js has a problem, it didn't connected to the html even I has insert its link

  • @BECSAQUIB
    @BECSAQUIB Рік тому

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

  • @TechBasicConcepts
    @TechBasicConcepts Рік тому

    Thank you for the educative tutorial

  • @owaist7385
    @owaist7385 Рік тому

    Awesome, super super excellent , Keep up the good work.

  • @ayeshashaikh2087
    @ayeshashaikh2087 Рік тому

    thank you so much this code of yours help me at very crucial movement

  • @piyush0mandloi
    @piyush0mandloi Рік тому

    thank you sir for this awesome content

  • @henryherrera5043
    @henryherrera5043 Рік тому

    Great short course! :D

  • @urjaangre2216
    @urjaangre2216 6 місяців тому

    For those who are getting the next question's option added to the previous qsn; Just add the resetState(); to beginning of showQuestion();

  • @gavinwaight
    @gavinwaight Рік тому +5

    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.

    • @prus_projektant1857
      @prus_projektant1857 Рік тому

      You need to download extension to change theme of code. Extension tab is on the left site of screen. I think you Can google "theme for code VS code" and you can choose one you like and then find and download theme extension in VS

    • @kunjalbhudke80
      @kunjalbhudke80 9 місяців тому

      Change the theme of VS Code from the settings option located in the bottom left corner. Each theme has its own font color.

  • @RAJACADEMY1
    @RAJACADEMY1 Рік тому +6

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

  • @JamesPenner-c9m
    @JamesPenner-c9m Рік тому +2

    Hi I really enjoyed this, you have a really great style of presenting and not talking overly quickly. I have subscribed and would like to join up. I wonder if I could get some help with this code for a work project I am doing.

  • @AxolotlAlex
    @AxolotlAlex 11 місяців тому

    For those who need it:
    * {
    margin: 0;
    padding : 0;
    font-family: 'Poppins' , sans-serif;
    box-sizing: border-box;
    }

  • @ajjunior1442
    @ajjunior1442 6 місяців тому +1

    I think i'm the only one that found this hard to grasp!

  • @Kalicharan-tu6kr
    @Kalicharan-tu6kr 5 місяців тому

    Love IT. 💗💗

  • @karcreative7312
    @karcreative7312 5 місяців тому +1

    Thank you so much...

    • @GreatStackDev
      @GreatStackDev  5 місяців тому

      Glad you liked it. You're welcome! 😊

  • @AdityaSharma-er3gs
    @AdityaSharma-er3gs 10 місяців тому

    hey! your videos are amazing, I just want to know the best place to study about JavaScript properties which I don't know about... when I was watching this video I didn't know about 'dataset'.

  • @mademen3804
    @mademen3804 Рік тому +2

    Great video, how do I add a timer to the quiz. So let's say 50 questions will have 20 minutes to answer questions.

    • @nsmworldentertainment4687
      @nsmworldentertainment4687 Рік тому +1

      if u findout any solution regarding how to add timer
      pls dm me

    • @tiestomate
      @tiestomate Рік тому

      Hi did you find a solution how to add timer to this quiz?

  • @kandoHunter69
    @kandoHunter69 9 місяців тому +1

    well event though im beginner, i had a doubt ...Like using dataset and classList to store the correct answer is not safe right?? the user would just use developer element to get answer. It would be better to use a indexing method or logical operator operation

  • @BrackProgrammerNOLA
    @BrackProgrammerNOLA Рік тому

    AWESOME JOB BRO!

  • @amiralisalari6863
    @amiralisalari6863 6 місяців тому

    Thanks a lot that was great, but what does dataset do??❤❤

  • @MelkerHulteke
    @MelkerHulteke 21 день тому

    thank u mister very nice

  • @magrigsdesign8469
    @magrigsdesign8469 3 місяці тому +1

    thanks so much

  • @PankajRaghunadhabhatla
    @PankajRaghunadhabhatla Рік тому

    Hello Avinash, Nice video and very easy and simplified. I want to ask you, after making an app like this, how do we make it live or as an app. I understand that this is for tutorial. What are the next steps into it. How do we go about it. Please guide on this.

  • @Aditya_Soni_23
    @Aditya_Soni_23 Рік тому

    tyyy man! it helped me so much

  • @privateclass8105
    @privateclass8105 Рік тому +2

    Please provide time set in this quiz for the next video.❤

  • @gamingdemon113
    @gamingdemon113 11 місяців тому

    it's bit harder for beginner in my opinion . recommended to do this after next 4-5 projects if you're new to js

  • @saxma1277
    @saxma1277 Рік тому +1

    Bro why are you changed your channel logo and name your previous logo and name were amazing and easy

  • @lukekoletsios3236
    @lukekoletsios3236 Рік тому

    thank you for the tutorial!