JS Object Review Quiz

JS Object Review Quiz

University

9 Qs

quiz-placeholder

Similar activities

Locke and Key

Locke and Key

4th Grade - Professional Development

8 Qs

Granny 3

Granny 3

7th Grade - Professional Development

7 Qs

01 Databases Overview

01 Databases Overview

University

10 Qs

Comm 1050 Chapter 11: Health Communication

Comm 1050 Chapter 11: Health Communication

University

10 Qs

Aviation Insurance

Aviation Insurance

University

11 Qs

D. Laboral. ADM23 T6.

D. Laboral. ADM23 T6.

University

8 Qs

Fortnite

Fortnite

8th Grade - Professional Development

10 Qs

E-signature vs Digital signature

E-signature vs Digital signature

University

10 Qs

JS Object Review Quiz

JS Object Review Quiz

Assessment

Quiz

Other

University

Hard

Created by

Haniya Ahmed

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a JavaScript object?

A collection of data types

A composite data type with multiple attributes

An array with various elements

A homogenous object with multiple attirbutes

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which notation is used to access properties of an object?

Dot Notation

Bracket Notation

Both Dot and Bracket Notation

Parenthese Notation

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create an empty object?

let obj = { };

let obj = [ ];

let obj = { }

let obj = ();

4.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which method can add a property to an object

obj.addProperty

obj.property = value

obj[property] = value

obj[property]

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

How can you remove a property from an object in JavaScript?

remove obj.property;

delete obj.property;

obj.property.remove();

delete obj[property];

6.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

What will be the output of the following code:

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to create a nested object in JavaScript?

let obj = {key: {nestedKey: value}};

let obj = {key: [nestedKey: value]};

let obj = [key: {nestedKey: value}];

let obj = {key: (nestedKey: value)};

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you loop through all the properties of an object?

for...of loop

for...in loop

forEach loop

while loop

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the result of console.log(obj['key']); if the key does not exist in the object?

null

undefined

false

Error