Search Header Logo

Javascript Quiz

Authored by itelasoft office

Computers

4th Grade

Used 12+ times

Javascript Quiz
AI

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

20 sec • 1 pt

Media Image

What is the output of the following code snippet?

1

2

undefined 

ReferenceError

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Which of the following comparisons return true in JavaScript?

1 and 3

1 and 4 

2 and 3 

2 and 4

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What is the value of arr3 after executing the following code snippet?

[1, 2, 3, 4, 5, 6] 

[1, 4, 2, 5, 3, 6] 

[4, 5, 6, 1, 2, 3] 

[1, 2, 3]

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following statements is true about JavaScript variables?

Variables must be declared using the 'var' keyword. 

Variables can be assigned values of any data type. 

Variables can be redeclared within the same scope using the 'let' keyword. 

Variables declared using the 'const' keyword can be reassigned a new value.

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is a valid way to create an empty object in JavaScript?

var obj = {}; 

var obj = (); 

var obj = []; 

var obj = "";

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the index of the first element in a JavaScript array?

0

1

-1

NaN

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is a valid way to access an element in a JavaScript array?

array(element) 

array[element] 

array{element} 

array.element

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?