JavaScript Arrays Quiz

JavaScript Arrays Quiz

10th Grade

10 Qs

quiz-placeholder

Similar activities

SAP S4 Training 1

SAP S4 Training 1

KG - Professional Development

12 Qs

College Admission

College Admission

9th - 12th Grade

15 Qs

Electronic Communication

Electronic Communication

10th - 11th Grade

14 Qs

Scratch intro & Pen Commands Quiz

Scratch intro & Pen Commands Quiz

1st - 10th Grade

10 Qs

I.C.T

I.C.T

10th - 12th Grade

15 Qs

After Effect Intoduction

After Effect Intoduction

10th Grade - University

15 Qs

Quiz: Motherboard

Quiz: Motherboard

3rd Grade - University

10 Qs

JavaScript Arrays Quiz

JavaScript Arrays Quiz

Assessment

Quiz

Instructional Technology

10th Grade

Practice Problem

Hard

Created by

Zemmary Batucan

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to create an empty array in JavaScript?

let emptyArray = {};

let emptyArray = [];

let emptyArray = new Array();

Both b) and c)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to access the second element of an array named colors?

colors[1]

colors.second

colors(1)

colors[2]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you add an element to the end of an array named fruits?

fruits.add("grape");

fruits.push("grape");

fruits.append("grape");

fruits.insert("grape");

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you remove the last element from an array named numbers?

numbers.remove();

numbers.pop();

numbers.delete();

numbers.shift();

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the length property of an array return?

The index of the last element.

The number of elements in the array.

The type of the array.

The first element of the array.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to create a 2D array in JavaScript?

let matrix = [1, 2, 3, 4, 5, 6];

let matrix = [[1, 2, 3], [4, 5, 6]];

let matrix = { 1: [1, 2, 3], 2: [4, 5, 6] };

let matrix = new Array(2, 3);

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the element at the second row and first column of a 2D array named matrix?

matrix[1][0]

matrix[0][1]

matrix[2][0]

matrix[0][2]

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?