Javascript basics 8

Javascript basics 8

Professional Development

40 Qs

quiz-placeholder

Similar activities

JS array & object

JS array & object

Professional Development

37 Qs

Qlik View Quiz 3

Qlik View Quiz 3

Professional Development

35 Qs

Personal Computing

Personal Computing

9th Grade - Professional Development

39 Qs

TCS - NQT Mock Test_2022

TCS - NQT Mock Test_2022

Professional Development

40 Qs

NOEP training_Test

NOEP training_Test

Professional Development

43 Qs

Quiz 1 - BSIS 3A - ITEDEV 313

Quiz 1 - BSIS 3A - ITEDEV 313

Professional Development

40 Qs

TCS_SumUP_Quiz

TCS_SumUP_Quiz

Professional Development

42 Qs

Sales QA Compliance

Sales QA Compliance

Professional Development

35 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?