Search Header Logo

JRDL - JS Arrays and Objects

Computers

6th Grade - Professional Development

Used 22+ times

JRDL - JS Arrays and Objects
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

30 sec • 1 pt

TRUE OR FALSE:


You can store any data type in arrays.

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct syntax for creating an array?

{ "cat", "dog, "mouse", 123, true }

[ cat, dog, mouse, 123 }

[ "cat"; "dog"; "mouse"; 123, true]

[ "cat", "dog", "mouse", 123, true]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

With the given array, how do I access "snickers"?


var candy = ["m & m's", "100 grand", "snickers"]

candy[1]

candy[3]

candy[2]

candy[0]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the two ways you can access objects?

Dot notation and bracket notation

Curl notation and dot notation

Square brackets and parentheses

Dot notation and parentheses

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for adding a property to the object provided below?


var cat = {};

cat[name] = 'felix';

cat[name] : 'felix';

cat.name : 'felix';

cat.name = 'felix';

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

TRUE OR FALSE: You can use .length on an array to get the total count of items in the array.

True

False

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for accessing an object using bracket notation?


Example object:


var object = {

name: 'Spot';

}

object["name"];

object{name};

object("name");

object[name];

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?