Javascript basics 8

Javascript basics 8

Professional Development

40 Qs

quiz-placeholder

Similar activities

esame corso programmatori 4.0

esame corso programmatori 4.0

Professional Development

43 Qs

Microsoft 70-773: Analyzing Big Data with Microsoft R Exam

Microsoft 70-773: Analyzing Big Data with Microsoft R Exam

Professional Development

38 Qs

NPA 1150 - Instrumentation (PV's)

NPA 1150 - Instrumentation (PV's)

Professional Development

42 Qs

Quiz_29.03.2023

Quiz_29.03.2023

Professional Development

41 Qs

MEM BW Pre - Evaluation

MEM BW Pre - Evaluation

Professional Development

40 Qs

Mas sobre arreglos

Mas sobre arreglos

Professional Development

36 Qs

Term1-Final-Quiz2024MATTAYOM1

Term1-Final-Quiz2024MATTAYOM1

Professional Development

40 Qs

M2 R5 MCQ (Test 8)

M2 R5 MCQ (Test 8)

Professional Development

40 Qs

Javascript basics 8

Javascript basics 8

Assessment

Quiz

Professional Development

Professional Development

Hard

Created by

Inna .

Used 1+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What type of loop in JavaScript is used to execute a block of code a specific number of times?

while loop

for loop

if loop

do...while loop

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which loop will always execute the code block at least once?

while loop

for loop

if loop

do...while loop

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

In a for loop, which part is optional?
a) Initialization
b) Condition
c) Increment/Decrement
d) All parts are required

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which of the following is the correct syntax for a for loop in JavaScript?
a) for (var i = 0; i < 10; i++)
b) for (i = 0; i < 10; i++)
c) for (var i = 0; i < 10)
d) for i = 0; i < 10; i++

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What is the purpose of the continue statement in a loop?
a) To terminate the loop immediately
b) To skip the current iteration and move to the next
c) To restart the loop from the beginning
d) To print a message to the console

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

How can an infinite loop be created using a for loop?
a) By providing an initial value
b) By not providing an exit condition
c) By using the break statement
d) By using the return statement

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What is the output of the following code snippet?: for (let i = 0; i < 5; i++) { console.log(i); }
a) 0
b) 1
c) 0 1 2 3 4
d) 1 2 3 4

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?