Search Header Logo

Arrays and Objects

Authored by Daniel Adesoji

Professional Development

Professional Development

Arrays and Objects
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 SELECT QUESTION

45 sec • 1 pt

Choose the correct ways to define an array?

const newArr = [ ]

const newArr = ( )

const newArr = new Array()

const newArr = { }

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given this array:
const newArray = [1, 2, 3, 4, 5]

What statement would return the value 3 from the array?

newArray[1]

newArray[2]

newArray[3]

newArray[4]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method is used to add elements to the end of an array?

push

add

insert

pop

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Bisi wants to loop over all the elements in her array named students, what property of the array can she use to set a condition and end the loop?

students.size

students.length

students.name

students.lastIndex

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which array method is used to create a new array with the results of calling a provided function on every element?

filter

reduce

map

forEach

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Nkem wants to change 3 to 30 in this array:

const ages = [10, 20, 3, 40, 50]

What statement should he use?

ages[1] = 30

ages[2] = 30

ages[3] = 30

ages[4] = 30

7.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following is/are the correct way(s) to define an object?

const person = { }

const person = new Object()

const person = Object.create(null)

const person = [ ]

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?