Search Header Logo

Skill #2 Array

Authored by Nixon López

Information Technology (IT)

12th Grade

Used 3+ times

Skill #2 Array
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

1. Which statement correctly declares an array in JavaScript?

var array = [1, 2, 3];

var array = {1, 2, 3};

var array = (1, 2, 3);

var array = <1, 2, 3>;

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How do you access the third element in an array named numbers?

numbers[2];

numbers[3];

numbers(3);

numbers{2};

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following initializes an empty array?

var array = [];

var array = {};

var array = ();

var array = <>;

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How can you iterate over an array named items using a for loop?

Media Image
Media Image
Media Image
Media Image

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which method adds one or more elements to the end of an array?

array.push(element);

array.pop();

array.shift();

array.unshift(element);

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be the output of the following code?

"apple"

"banana"

"mango"

undefined

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does the following code return?

0

1

2

-1

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?