
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
15 questions
DSA (QUIZ 7) -Greedy Algorithms and Complexity Analysis

Quiz
•
University
12 questions
Konteynerlar (C++)

Quiz
•
University
10 questions
HTML + CSS + JS

Quiz
•
University
10 questions
Quick Sort

Quiz
•
University
18 questions
Codean - Java Rekursi

Quiz
•
University
11 questions
Структурированный тип данных массив

Quiz
•
10th Grade - University
15 questions
Oracle PL/SQL Quizz

Quiz
•
University
15 questions
Understanding Loops in C Programming

Quiz
•
1st Grade - University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade