
Week 4.2
Authored by Poul Nichols
Computers
Professional Development
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax of a for loop in JavaScript?
for (initialization; condition; increment/decrement) { // Block of Code }
for { // Block of Code } (initialization; condition; increment/decrement)
for [initialization; condition; increment/decrement] { // Block of Code }
for (condition; initialization; increment/decrement) { // Block of Code }
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a for loop?
To execute a block of code repeatedly while a condition is true
To execute a block of code repeatedly until a condition is true
To execute a block of code once
To execute a block of code randomly
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between i++ and ++i in a for loop?
There is no difference
i++ increments i after the expression is evaluated, while ++i increments i before the expression is evaluated
i++ increments i by 2, while ++i increments i by 1
i++ decrements i, while ++i increments i
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
for (let i = 0; i < 5; i++) { console.log(i); }
0 1 2 3 4
1 2 3 4 5
0 1 2 3 4 5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is true about a nested for loop in JavaScript?
It is a loop inside another loop.
It can only iterate over arrays.
It can only iterate over objects.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
for (var i = 1; i <= 10; i++) {
if (i == 3) { document.write("*");}
}
*
*****
**********
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code?
for (var i = 3; i >= 1; i--) {
for (var j = 1; j <= i; j++) {document.write("*"); }
document.write("<br>"); }
*
***
***
***
*
**
***
***
**
*
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
14 questions
Linux Command Line Quiz
Quiz
•
Professional Development
15 questions
OS Quiz
Quiz
•
Professional Development
12 questions
Tablero
Quiz
•
Professional Development
10 questions
VLAN
Quiz
•
Professional Development
10 questions
Competencias Digitales
Quiz
•
Professional Development
15 questions
JDBC_Objective_Exam_2
Quiz
•
Professional Development
10 questions
Operation Reliability
Quiz
•
Professional Development
10 questions
Git & Github
Quiz
•
Professional Development
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 Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...