Skip to content

Commit

Permalink
Merge pull request #31 from ThakareSakshi/question_23
Browse files Browse the repository at this point in the history
added question no. 23
  • Loading branch information
Sar-taj107 committed Oct 23, 2023
2 parents f34b4a5 + feec3a2 commit a5b1844
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 36 deletions.
95 changes: 61 additions & 34 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,36 @@
</div>

<form class="quiz-form">
<div class="question" >
<div class="question">
<p>1. Inside which HTML element do we put the JavaScript?</p>
<div class="option">
<input type="radio" name="q1" id="" value="A">
<label for="">js</label>
</div>
<div class="option">
<input type="radio" name="q1" id="" value="B">
<label for="">javascript</label>
</div>
<div class="option">
<input type="radio" name="q1" id="" value="C">
<label for="">scripting</label>
</div>
<div class="option">
<input type="radio" name="q1" id="" value="D">
<label for="">script</label>
</div>
<div class="option">
<input type="radio" name="q1" id="" value="A">
<label for="">js</label>
</div>
<div class="option">
<input type="radio" name="q1" id="" value="B">
<label for="">javascript</label>
</div>



<div class="option">
<input type="radio" name="q1" id="" value="C">
<label for="">scripting</label>
</div>
<div class="option">
<input type="radio" name="q1" id="" value="D">
<label for="">script</label>
</div>


<div class="option" hidden>
<input type="radio" name="q1" id="" value="E" checked>
<label for="">Hidden</label>
</div>
</div>

<div class="question" >
<div class="question">
<p>2. Where is the correct place to insert a Javascript file?</p>
<div class="option">
<input type="radio" name="q2" id="" value="A">
Expand Down Expand Up @@ -94,7 +94,7 @@
</div>
</div>

<div class="question" >
<div class="question">
<p>4. How do you write "Hello World" in an alert box?</p>
<div class="option">
<input type="radio" name="q4" id="" value="A">
Expand Down Expand Up @@ -142,7 +142,7 @@
</div>
</div>

<div class="question" >
<div class="question">
<p>6. What does the "typeof" operator return when used with a function in JavaScript?</p>
<div class="option">
<input type="radio" name="q6" id="" value="A">
Expand Down Expand Up @@ -239,7 +239,7 @@
</div>
</div>

<div class="question" >
<div class="question">
<p>10. Which HTTP status code indicates that a resource is not found on the server?</p>
<div class="option">
<input type="radio" name="q10" id="" value="A">
Expand All @@ -263,7 +263,7 @@
</div>
</div>

<div class="question" >
<div class="question">
<p>11. Javascript is an ________ language?</p>
<div class="option">
<input type="radio" name="q11" id="" value="A">
Expand All @@ -287,7 +287,7 @@
</div>
</div>

<div class="question" >
<div class="question">
<p>12. How can you detect the client's browser name?</p>
<div class="option">
<input type="radio" name="q12" id="" value="A">
Expand Down Expand Up @@ -335,7 +335,7 @@
</div>
</div>

<div class="question" >
<div class="question">
<p>14. What does API stand for?</p>
<div class="option">
<input type="radio" name="q14" id="" value="A" />
Expand All @@ -359,7 +359,7 @@
</div>
</div>

<div class="question" >
<div class="question">
<p>15. Which of the following is not a valid way to declare a variable in JavaScript?</p>
<div class="option">
<input type="radio" name="q15" id="" value="A">
Expand All @@ -383,7 +383,7 @@
</div>
</div>

<div class="question" >
<div class="question">
<p>16. Which of the following are not server-side Javascript objects?</p>
<div class="option">
<input type="radio" name="q16" id="" value="A">
Expand All @@ -407,7 +407,7 @@
</div>
</div>

<div class="question" >
<div class="question">
<p>17. Which keyword is used to declare a function in JavaScript?</p>
<div class="option">
<input type="radio" name="q17" id="" value="A">
Expand All @@ -431,7 +431,7 @@
</div>
</div>

<div class="question" >
<div class="question">
<p>18. Which of the following methods is used to access HTML elements using Javascript?</p>
<div class="option">
<input type="radio" name="q18" id="" value="A">
Expand All @@ -455,7 +455,7 @@
</div>
</div>

<div class="question" >
<div class="question">
<p>19. In JavaScript, what is the purpose of the addEventListener method used for?</p>
<div class="option">
<input type="radio" name="q19" id="" value="A">
Expand Down Expand Up @@ -551,6 +551,33 @@
</div>
</div>



<div class="question">
<p>23. Which of the following methods can be used to display data in some form using Javascript?</p>
<div class="option">
<input type="radio" name="q23" id="" value="A">
<label for="">document.write()</label>
</div>
<div class="option">
<input type="radio" name="q23" id="" value="B">
<label for="">console.log()</label>
</div>
<div class="option">
<input type="radio" name="q23" id="" value="C">
<label for="">window.alert()</label>
</div>
<div class="option">
<input type="radio" name="q23" id="" value="D">
<label for="">All of the Above</label>
</div>

<div class="option" hidden>
<input type="radio" name="q23" id="" value="E" checked>
<label for="">Hidden</label>
</div>
</div>

<div class="result hide">
<div class="message" id="message"></div>
<p></p>
Expand Down
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const correctAnswer = ["D", "B", "C", "B", "D", "A", "B", "D", "A", "B", "A", "C", "B", "C", "D", "C", "B", "C", "A", "C", "C","B"];
const correctOptions = ["D", "B", "C", "B", "D", "A", "B", "D", "A", "B", "A", "C", "B", "C", "D", "C", "B", "C", "A", "C", "C","B"];
const correctAnswer = ["D", "B", "C", "B", "D", "A", "B", "D", "A", "B", "A", "C", "B", "C", "D", "C", "B", "C", "A", "C", "C","B","D"];
const correctOptions = ["D", "B", "C", "B", "D", "A", "B", "D", "A", "B", "A", "C", "B", "C", "D", "C", "B", "C", "A", "C", "C","B","D"];

const form = document.querySelector(".quiz-form");
const result = document.querySelector(".result");
Expand Down

0 comments on commit a5b1844

Please sign in to comment.