KA JS Loops

KA JS Loops

KG - University

5 Qs

quiz-placeholder

Similar activities

Node.js

Node.js

University

10 Qs

Computer

Computer

3rd Grade

10 Qs

REPARTO PROPORCIONAL

REPARTO PROPORCIONAL

1st - 3rd Grade

10 Qs

Hệ Điều Hành Của Máy Tính

Hệ Điều Hành Của Máy Tính

10th Grade - University

10 Qs

Computer Security

Computer Security

8th - 10th Grade

10 Qs

KOD ARAHAN HTML

KOD ARAHAN HTML

1st Grade

10 Qs

tin 10 l11

tin 10 l11

12th Grade

10 Qs

Kiểm tra TX tin 8

Kiểm tra TX tin 8

8th Grade

10 Qs

KA JS Loops

KA JS Loops

Assessment

Quiz

Computers

KG - University

Practice Problem

Hard

Used 154+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is not a type of loop in JavaScript?

while
for
repeat

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these expressions is NOT a valid way to add 1 to a variable in JavaScript?

x++
x += 1
x = x + 1
x+

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Let's say you have an x variable that starts as 0. If you want your while loop to stop once the x variable equals 400, what condition would you use?

x < 400
x > 400
x == 400
x >= 400

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Let's say you want to repeat a shape 20 times. Which for loop would help you code that?

for (var i = 1; i < 20; i++) { } 
for (var i = 0; i <= 20; i++) { } 
for (var i = 0; i < 20; i++) { } 
for (var i = 0; i > 20; i++) { } 

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Let's say you want to repeat a shape horizontally across the 400x400 canvas, with 40 pixels between each shape. Which for loop would help you code that?

for (var x = 0; x > 400; x += 40) { } 
for (var x = 0; x < 400; x += 40) { } 
for (var x = 0; x < 400; x++) { } 
for (var x = 0; x > 400; x++) { } 

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?