
JavaScript-Day2
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Hard
Chitra Muthu
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which type of loop executes at least once before checking the condition?
for loop
while loop
do-while loop
foreach loop
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What will the following code output?
for (let i = 0; i < 5; i++) {
console.log(i);
}
0 to 4
1 to 5
0 to 5
Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which statement is used to exit a loop prematurely?
stop
return
break
exit
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the correct way to select an element with the ID demo?
document.getElementsByClassName('demo')
document.getElementById('demo')
document.querySelector('.demo')
document.getElementsByTagName('demo')
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
How can you create a new HTML element using JavaScript?
document.newElement("p")
document.appendChild("p")
document.createElement("p")
document.writeElement("p")
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which property is used to change the text of an HTML element?
innerText
textContent
innerHTML
All of the above
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which method is used to remove an element from the DOM?
element.remove()
document.deleteElement()
element.destroy()
document.removeChild()
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Refresh Python
Quiz
•
University
12 questions
CLC Lesson 7 Quiz
Quiz
•
University
14 questions
Data Structures and Algorithms Quiz
Quiz
•
University
20 questions
Activity - Task Completion and Safety
Quiz
•
9th Grade - University
20 questions
Week 1 - Topic 1 SECP3623-02
Quiz
•
University
10 questions
Počítačová grafika
Quiz
•
6th Grade - University
18 questions
Diagnostico Grado Sexto
Quiz
•
6th Grade - University
15 questions
Test wiedzy: Tablice jednowymiarowe w C++
Quiz
•
10th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University
