KA JS Objects

KA JS Objects

KG - University

6 Qs

quiz-placeholder

Similar activities

Un Jarvis

Un Jarvis

8th Grade

8 Qs

kiểm tra tin học 8

kiểm tra tin học 8

8th Grade

10 Qs

XI_осн_кон

XI_осн_кон

6th - 8th Grade

10 Qs

bài tập 11 tiết 7

bài tập 11 tiết 7

11th Grade

10 Qs

INTRODUCCION A LA PROGRAMACION

INTRODUCCION A LA PROGRAMACION

6th Grade - University

10 Qs

Khởi động bài học

Khởi động bài học

8th Grade

10 Qs

assemblyLanguageChap3

assemblyLanguageChap3

University

10 Qs

Komputer Kelas 4

Komputer Kelas 4

4th Grade

10 Qs

KA JS Objects

KA JS Objects

Assessment

Quiz

Computers

KG - University

Practice Problem

Hard

Used 73+ times

FREE Resource

AI

Enhance your content in a minute

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

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is a valid line of JS code that stores an object in a variable?

var me = {age=31, hair='brown'};
var me = {age: 31, hair: 'brown'};
var me = {age:31 hair:'brown'};
var me = {var age=31, var hair='brown'};

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these objects have 3 properties?

var me = {age: 31, hair: 'brown'};
var me = {age: 31};
var me = {age: 31, hair: 'brown', eyes: 'blue'};
var me = {hair: ['brown', 'blonde', 'pink']};

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Let's say you're storing an object in a variable named 'angel' with the property 'fur'. Which line of code would change that property's value?

angel.fur = 'orange';
angel[fur] = 'orange';
angel_fur = 'orange';
var angel.fur = 'orange';

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Let's say you're storing an object in a variable named 'pumpkin'. Which line of code would add a new property 'eyes' to the object?

pumpkin.push({eyes: 'green'});
pumpkin[eyes] = 'green';
pumpkin.eyes = 'green';
var pumpkin.eyes = 'green'

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does JavaScript return to you if you try to access a object's property that doesn't exist?

null
undefined
'oopsies!'
0

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is a valid line of JS that stores an array of objects in a variable?

var books = [{title: 'Robot Dreams', author: 'Asimov'}];
var books = [{title='Robot Dreams', author='Asimov'}];
var books = {[title: 'Robot Dreams', author: 'Asimov']};
var books = [title: 'Robot Dreams', author: 'Asimov'];

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?