
JavaScript-Day2

Quiz
•
Information Technology (IT)
•
University
•
Hard
Chitra Muthu
FREE Resource
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()
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Sequencing Blockly - 2

Quiz
•
7th Grade - University
10 questions
24-2 IT104 P1

Quiz
•
University
10 questions
HTML + CSS + JS

Quiz
•
University
15 questions
DSA (QUIZ 7) -Greedy Algorithms and Complexity Analysis

Quiz
•
University
17 questions
Базовые основы HTML, CSS, JS, Web APIs

Quiz
•
University
10 questions
Chapter Quiz

Quiz
•
University
15 questions
Python Loop

Quiz
•
University
10 questions
Uji Pemahaman Berpikir Komputasioal

Quiz
•
8th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University