KA JS Objects

KA JS Objects

KG - University

6 Qs

quiz-placeholder

Similar activities

Test Robotica

Test Robotica

8th Grade

10 Qs

JavaScript Basics

JavaScript Basics

6th - 8th Grade

10 Qs

TIPOS DE ROBÓTS

TIPOS DE ROBÓTS

4th Grade

10 Qs

Functions and Parameters Summative preview

Functions and Parameters Summative preview

9th - 12th Grade

10 Qs

JavaScript Cert Prep

JavaScript Cert Prep

9th - 12th Grade

10 Qs

Linux Logs

Linux Logs

10th Grade - University

10 Qs

System Logging Linux

System Logging Linux

Professional Development

10 Qs

KIỂM TRA THƯỜNG XUYÊN - HỌC KÌ 1 - TIN 8

KIỂM TRA THƯỜNG XUYÊN - HỌC KÌ 1 - TIN 8

1st - 10th Grade

10 Qs

KA JS Objects

KA JS Objects

Assessment

Quiz

Computers

KG - University

Hard

Used 72+ times

FREE Resource

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'];